se.liu.ida.critiquer.scenarios.standard
Class FirstAidActivity

java.lang.Object
  extended by se.liu.ida.critiquer.activities.Activity
      extended by se.liu.ida.critiquer.scenarios.standard.FirstAidActivity
All Implemented Interfaces:
Serializable

public class FirstAidActivity
extends Activity

See Also:
Serialized Form

Nested Class Summary
static class FirstAidActivity.Properties
           
 
Field Summary
 
Fields inherited from class se.liu.ida.critiquer.activities.Activity
type
 
Constructor Summary
FirstAidActivity(Activity parent)
           
 
Method Summary
 void addDefaultParams()
          Add name, description, start and end time for all activities
 boolean canBeSimulated()
          Test if this activity can be simulated.
 int getInjured()
           
 int getNumActivities()
          Each subclass of Activity should have a static counter of how many activities have been created, so that we may create unique new names for newly created activities.
 void order(Activity laterActivity)
          Add location parameter dependency
 long simulate()
          Calculates the effects of performing a mission with respect to some state.
 
Methods inherited from class se.liu.ida.critiquer.activities.Activity
acquirePendingUpdatesLock, addActivityUpdateListener, addAll, addChild, addNameChangeListener, addParam, addPrivateUpdateListener, addStaticConsistencyChecker, canBeChildOf, canComeBefore, debug, endParentRelationship, equals, error, fatal, getAtomicUpdateLock, getChildren, getEndTime, getMaxTime, getParams, getParent, getPendingupdates, getRootActivity, getStartTime, getStaticConsistencyCheckers, getStaticUpdateListeners, getTemporalConstraints, hasParent, indexOfChild, info, initParentRelationship, isAgentAssignable, isConsistent, postLoad, preSave, releasePendingUpdatesLock, removeChild, removeChildren, removeOrder, removePrivateUpdateListener, setParent, signalActivityRemoved, signalActivityUpdated, signalParamChanged, signalParamChanged, toString, warn
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FirstAidActivity

public FirstAidActivity(Activity parent)
Method Detail

addDefaultParams

public void addDefaultParams()
Description copied from class: Activity
Add name, description, start and end time for all activities

Overrides:
addDefaultParams in class Activity

simulate

public long simulate()
Description copied from class: Activity
Calculates the effects of performing a mission with respect to some state. This is supposed to be used during simulation.

Specified by:
simulate in class Activity

getInjured

public int getInjured()
Returns:
Returns the injured.

getNumActivities

public int getNumActivities()
Description copied from class: Activity
Each subclass of Activity should have a static counter of how many activities have been created, so that we may create unique new names for newly created activities.

Specified by:
getNumActivities in class Activity
Returns:
the number of objects of this class that have been created.

order

public void order(Activity laterActivity)
Add location parameter dependency

Overrides:
order in class Activity
Parameters:
laterActivity - The activity that should come after this
See Also:
Activity.order(se.liu.ida.critiquer.activities.Activity)

canBeSimulated

public boolean canBeSimulated()
Description copied from class: Activity
Test if this activity can be simulated. This usually entails checking that some structural constraints hold. It is assumed that this method is checked before any simulation or time calculation takes place.

Specified by:
canBeSimulated in class Activity
Returns: