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

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

public class RoadBlockActivity
extends Activity

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class se.liu.ida.critiquer.activities.Activity
Activity.Properties
 
Field Summary
 
Fields inherited from class se.liu.ida.critiquer.activities.Activity
type
 
Constructor Summary
RoadBlockActivity(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 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.
 long simulate()
          It takes the amount of time of the fastest agent to perform this operation.
 
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, order, 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

RoadBlockActivity

public RoadBlockActivity(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()
It takes the amount of time of the fastest agent to perform this operation.

Specified by:
simulate in class Activity

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.

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: