BamBirds 2021
de.uniba.sme.bambirds.common.Strategy Interface Reference
Inheritance diagram for de.uniba.sme.bambirds.common.Strategy:

Public Member Functions

void plan (StrategyConsumer consumer, long timeOut)
 
List< PlanplanSynchronously (long timeOut)
 
void kill ()
 
boolean isCancelled ()
 

Detailed Description

The

Strategy

interface is used to execute (ideally concurrent) implementations of different planners and receive the results.

See also
StrategyConsumer

Member Function Documentation

◆ isCancelled()

boolean de.uniba.sme.bambirds.common.Strategy.isCancelled ( )

Returns

true

if this strategy was cancelled before it completed normally.

Returns
true
if this strategy was cancelled before it completed

Implemented in de.uniba.sme.bambirds.planner.PrologPlanner.

◆ kill()

void de.uniba.sme.bambirds.common.Strategy.kill ( )

Kill the

Strategy

, i.e. tell it to stop planning and shut down.

Implemented in de.uniba.sme.bambirds.planner.PrologPlanner.

◆ plan()

void de.uniba.sme.bambirds.common.Strategy.plan ( StrategyConsumer  consumer,
long  timeOut 
)

Start the

Strategy

's planning. The

Strategy

will call StrategyConsumer#post(List) or StrategyConsumer#post(Plan) to submit its plans. The planning should finish within

timeOut

milliseconds, after that it may be stopped.

Ideally individual plans are submitted to

consumer

as soon as they are found and planning is stopped after

timeOut

.

Parameters
consumerThe StrategyConsumer instance whose
post
method will be used for the callback
timeOutThe maximum amount of time available for planning in milliseconds

Implemented in de.uniba.sme.bambirds.planner.PrologPlanner.

◆ planSynchronously()

List< Plan > de.uniba.sme.bambirds.common.Strategy.planSynchronously ( long  timeOut)

Start the

Strategy

's planning. The

Strategy

will return all found Targets. The planning should finish within

timeOut

milliseconds, after that it will be stopped and if the Strategy supports it unfiltered plans are then returned.

Parameters
timeOutThe maximum amount of time available for planning in milliseconds

Implemented in de.uniba.sme.bambirds.planner.PrologPlanner.


The documentation for this interface was generated from the following file: