|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AgentContributionCalculator<T extends Activity>
Interface for functions defined by agents that calculate how long a mission takes to complete. What do we mean by this?
For the missions that agents can participate in, there should be some notion of what capacity they have with respect to handling the mission. This does not, however, have to imply that each agent can solve a mission on their own.
There are only a few cases here as I see it, all under the condition that the agent can actually contribute to an activity:
Both these contributions can be accomodated using a single method that
performs
some task and, if appropriate, modifies properties of
the activity to reflect the work done. The return value is then the time it
took the unit to perform its task. The activity may then calculate how long
it will take to complete based on the agents participating by using either
the side effects they cause or
"Given" amounts are calculated or specified by the agent. The human planner should specify which agents to use and the job here is only to perform the specified activity.
Method Summary | |
---|---|
long |
perform(T activity,
HashMap<Activity.Properties,Integer> attributes)
Perform some work by modifying appropriate attributes in the activity to indicate what is being done. |
Method Detail |
---|
long perform(T activity, HashMap<Activity.Properties,Integer> attributes)
perform
would transport as many people as would fit
into the vehicle and drive to location B. The next call would then imply
going back to location A, fetch another batch of people there and go
back to B.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |