BamBirds 2021
|
Public Member Functions | |
PrologPlanner (Level level, String basename, PrologPlanParser parser) | |
PrologPlanner (String knowledgeBaseFilename, PrologPlanParser parser) | |
PrologPlanner (SWIConnector connector, String knowledgeBaseFilename, PlanParser parser) | |
void | plan (StrategyConsumer consumer, long timeOut) |
List< Plan > | planSynchronously (long timeOut) |
void | kill () |
boolean | isCancelled () |
boolean | isFinished () |
Static Public Member Functions | |
static void | compileExecutable () |
Private Member Functions | |
void | startSWIConnector (SWIConnector connector) |
Private Attributes | |
final SWIConnector | connector |
Thread | connectorThread |
final String | knowledgeBaseFilename |
final PlanParser | parser |
boolean | finished = false |
boolean | cancelled = false |
Static Private Attributes | |
static final Logger | log = LogManager.getLogger() |
de.uniba.sme.bambirds.planner.PrologPlanner.PrologPlanner | ( | Level | level, |
String | basename, | ||
PrologPlanParser | parser | ||
) |
Create a new PrologPlanner including a knowledge base and connector to Prolog
level | for which the model should be built |
basename | base name for the knowledge file |
parser | a Parser for Prolog targets |
de.uniba.sme.bambirds.planner.PrologPlanner.PrologPlanner | ( | String | knowledgeBaseFilename, |
PrologPlanParser | parser | ||
) |
Create a new PrologPlanner including a connector to Prolog given an existing knowledge base
knowledgeBaseFilename | Path to the knowledge base |
parser | a Parser for Prolog targets |
de.uniba.sme.bambirds.planner.PrologPlanner.PrologPlanner | ( | SWIConnector | connector, |
String | knowledgeBaseFilename, | ||
PlanParser | parser | ||
) |
Create a new PrologPlanner using the given connector to Prolog and existing knowledge base
connector | Connector to Prolog |
knowledgeBaseFilename | Path to the knowledge base |
parser | a Parser for Prolog targets |
boolean de.uniba.sme.bambirds.planner.PrologPlanner.isCancelled | ( | ) |
Returns
if this strategy was cancelled before it completed normally.
Implements de.uniba.sme.bambirds.common.Strategy.
void de.uniba.sme.bambirds.planner.PrologPlanner.kill | ( | ) |
Kill the
, i.e. tell it to stop planning and shut down.
Implements de.uniba.sme.bambirds.common.Strategy.
void de.uniba.sme.bambirds.planner.PrologPlanner.plan | ( | StrategyConsumer | consumer, |
long | timeOut | ||
) |
Start the
's planning. The
will call StrategyConsumer#post(List) or StrategyConsumer#post(Plan) to submit its plans. The planning should finish within
milliseconds, after that it may be stopped.
Ideally individual plans are submitted to
as soon as they are found and planning is stopped after
.
consumer | The StrategyConsumer instance whose post
|
timeOut | The maximum amount of time available for planning in milliseconds |
Implements de.uniba.sme.bambirds.common.Strategy.
List< Plan > de.uniba.sme.bambirds.planner.PrologPlanner.planSynchronously | ( | long | timeOut | ) |
Start the
's planning. The
will return all found Targets. The planning should finish within
milliseconds, after that it will be stopped and if the Strategy supports it unfiltered plans are then returned.
timeOut | The maximum amount of time available for planning in milliseconds |
Implements de.uniba.sme.bambirds.common.Strategy.