BamBirds 2021
|
Public Member Functions | |
void | plan (StrategyConsumer consumer, long timeOut) |
List< Plan > | planSynchronously (long timeOut) |
void | kill () |
boolean | isCancelled () |
The
interface is used to execute (ideally concurrent) implementations of different planners and receive the results.
boolean de.uniba.sme.bambirds.common.Strategy.isCancelled | ( | ) |
Returns
if this strategy was cancelled before it completed normally.
Implemented in de.uniba.sme.bambirds.planner.PrologPlanner.
void de.uniba.sme.bambirds.common.Strategy.kill | ( | ) |
Kill the
, i.e. tell it to stop planning and shut down.
Implemented in de.uniba.sme.bambirds.planner.PrologPlanner.
void de.uniba.sme.bambirds.common.Strategy.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 |
Implemented in de.uniba.sme.bambirds.planner.PrologPlanner.
List< Plan > de.uniba.sme.bambirds.common.Strategy.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 |
Implemented in de.uniba.sme.bambirds.planner.PrologPlanner.