Package jsl.modeling.elements.spatial
Class AbstractMovementController
- java.lang.Object
-
- jsl.simulation.ModelElement
-
- jsl.simulation.SchedulingElement
-
- jsl.modeling.elements.spatial.AbstractMovementController
-
- All Implemented Interfaces:
MovementControllerIfc
,VelocityIfc
,ObservableIfc
,GetNameIfc
,IdentityIfc
- Direct Known Subclasses:
EuclideanStepBasedMovementController
public abstract class AbstractMovementController extends SchedulingElement implements MovementControllerIfc
An AbstractMovementController can be used to control the movements of an AbstractMover
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jsl.simulation.ModelElement
ModelElement.EventBuilderIfc<T>, ModelElement.EventScheduler<T>, ModelElement.ModelElementComparator, ModelElement.RequestBuilder, ModelElement.RequestDurationIfc, ModelElement.RequestTimeIfc, ModelElement.RequestUsingIfc, ModelElement.TimedUpdateEventAction, ModelElement.TimeUnitIfc<T>, ModelElement.WarmUpEventAction
-
-
Field Summary
Fields Modifier and Type Field Description protected double
myVelFactor
The velocity addFactor, default is 1.protected RandomVariable
myVelocity
-
Fields inherited from class jsl.simulation.ModelElement
AFTER_EXPERIMENT, AFTER_REPLICATION, BEFORE_EXPERIMENT, BEFORE_REPLICATION, CONDITIONAL_ACTION_REGISTRATION, DEFAULT_TIMED_EVENT_PRIORITY, INITIALIZED, MONTE_CARLO, myAfterExperimentOption, myAfterReplicationOption, myBeforeExperimentOption, myBeforeReplicationOption, myInitializationOption, myLengthOfWarmUp, myModelElements, myMonteCarloOption, myObservableComponent, myReplicationEndedOption, myTimedUpdateActionListener, myTimedUpdateEvent, myTimedUpdateInterval, myTimedUpdateOption, myTimedUpdatePriority, myWarmUpActionListener, myWarmUpEvent, myWarmUpIndicator, myWarmUpOption, myWarmUpPriority, NONE, REMOVED_FROM_MODEL, REPLICATION_ENDED, TIME_UNIT_DAY, TIME_UNIT_HOUR, TIME_UNIT_MILLISECOND, TIME_UNIT_MINUTE, TIME_UNIT_SECOND, TIME_UNIT_WEEK, TIMED_UPDATE, UPDATE, WARMUP
-
-
Constructor Summary
Constructors Constructor Description AbstractMovementController(ModelElement parent)
AbstractMovementController(ModelElement parent, java.lang.String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
controlMovement(AbstractMover movingElement)
Implementors must provide this method to set the movement of AbstractMoverdouble
getVelocity()
The velocity for an individual movementdouble
getVelocityChangeFactor()
The addFactor will be used to increase or decrease the velocity returned by getVelocity()RandomIfc
getVelocityInitialRandomSource()
RandomIfc
getVelocityRandomSource()
void
setVelocityChangeFactor(double factor)
The addFactor will be used to increase or decrease the velocity returned by getVelocity()void
setVelocityInitialRandomSource(RandomIfc velocity)
Sets the underlying initial random source associated with the determination of the velocityvoid
setVelocityRandomSource(RandomIfc velocity)
Sets the current underlying random source associated with the determination of the velocity-
Methods inherited from class jsl.simulation.SchedulingElement
cancelEvent, rescheduleEvent, rescheduleEvent, rescheduleEvent, rescheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent
-
Methods inherited from class jsl.simulation.ModelElement
addObserver, addObserverToModelElements, afterExperiment, afterExperiment_, afterReplication, afterReplication_, asString, beforeExperiment, beforeExperiment_, beforeReplication, beforeReplication_, buildEventGenerator, cancelTimedUpdateEvent, cancelWarmUpEvent, changeParentModelElement, checkForAfterExperiment, checkForAfterReplication, checkForBeforeExperiment, checkForBeforeReplication, checkForConditionalActionRegistration, checkForInitialize, checkForMonteCarlo, checkForRemoveFromModel, checkForReplicationEnded, checkForTimedUpdate, checkForUpdate, checkForWarmUp, checkObserverState, checkWarmUpOption, clearModelElementObservers, contains, countObservers, createEntity, createEntity, createQObject, day, deleteObserver, deleteObserverFromModelElements, deleteObservers, findModelElementWithWarmUpEvent, getAfterExperimentOption, getAfterReplicationOption, getAllCounters, getAllModelElements, getAllRandomElements, getAllResponseVariables, getAllVariables, getBeforeExperimentOption, getBeforeReplicationOption, getChildModelElementIterator, getCurrentReplicationNumber, getDefaultEntityType, getExecutive, getExperiment, getId, getInitializationOption, getInitializationOrderAsString, getLeftPreOrderTraversalCount, getLengthOfWarmUp, getModel, getModelElementCompartor, getModelElementsAsString, getModelElementsAsString, getModelElementsAsString, getMonteCarloOption, getName, getNumberOfModelElements, getObserverState, getParentModelElement, getPreviousObserverState, getReplicationEndedOption, getRightPreOrderTraversalCount, getSimulation, getSpatialModel, getStringLabel, getThisElementsCounters, getThisElementsModelElements, getThisElementsRandomVariables, getThisElementsResponseVariables, getThisElementsVariables, getTime, getTimedUpdateInterval, getTimedUpdateOption, getUpdateNotificationFlag, getVariable, getWarmUpEventTime, getWarmUpOption, hour, indent, initialize, initialize_, isTimedUpdateEventScheduled, isWarmedUp, isWarmUpEventScheduled, isWarmUpScheduled, millisecond, minute, montecarlo, montecarlo_, notifyAfterExperimentObservers, notifyAfterReplicationObservers, notifyBeforeExperimentObservers, notifyBeforeReplicationObservers, notifyConditionalActionRegistrationObservers, notifyInitializationObservers, notifyMonteCarloObservers, notifyObservers, notifyObservers, notifyRemovingFromModelObservers, notifyReplicationEndedObservers, notifyTimedUpdateObservers, notifyUpdateObservers, notifyWarmUpObservers, registerConditionalActions, registerConditionalActions_, removedFromModel, removeFromModel, replicationEnded, replicationEnded_, schedule, second, seize, setAfterExperimentOption, setAfterExperimentOptionForModelElements, setAfterReplicationOption, setAfterReplicationOptionForModelElements, setBeforeExperimentOption, setBeforeExperimentOptionForModelElements, setBeforeReplicationOption, setBeforeReplicationOptionForModelElements, setInitializationOption, setInitializationOptionForModelElements, setLengthOfWarmUp, setModel, setMonteCarloOption, setMonteCarloOptionForModelElements, setName, setObserverState, setParentModelElement, setReplicationEndedOption, setReplicationEndedOptionForModelElements, setSpatialModel, setStringLabel, setTimedUpdateInterval, setTimedUpdateOption, setTimedUpdateOptionForModelElements, setUpdateNotificationFlag, setWarmUpOption, setWarmUpOptionForModelElements, stopExecutive, stopExecutive, timedUpdate, timedUpdate_, toString, update, useControls, warmUp, warmUp_, week
-
-
-
-
Field Detail
-
myVelFactor
protected double myVelFactor
The velocity addFactor, default is 1. If this is changed, it is changed for all replications
-
myVelocity
protected RandomVariable myVelocity
-
-
Constructor Detail
-
AbstractMovementController
public AbstractMovementController(ModelElement parent)
- Parameters:
parent
-
-
AbstractMovementController
public AbstractMovementController(ModelElement parent, java.lang.String name)
- Parameters:
parent
-name
-
-
-
Method Detail
-
controlMovement
public abstract void controlMovement(AbstractMover movingElement)
Description copied from interface:MovementControllerIfc
Implementors must provide this method to set the movement of AbstractMover- Specified by:
controlMovement
in interfaceMovementControllerIfc
-
setVelocityChangeFactor
public final void setVelocityChangeFactor(double factor)
Description copied from interface:VelocityIfc
The addFactor will be used to increase or decrease the velocity returned by getVelocity()- Specified by:
setVelocityChangeFactor
in interfaceVelocityIfc
- Parameters:
factor
- must be greater than zero
-
getVelocityChangeFactor
public final double getVelocityChangeFactor()
Description copied from interface:VelocityIfc
The addFactor will be used to increase or decrease the velocity returned by getVelocity()- Specified by:
getVelocityChangeFactor
in interfaceVelocityIfc
- Returns:
- the addFactor
-
getVelocity
public double getVelocity()
The velocity for an individual movement- Specified by:
getVelocity
in interfaceVelocityIfc
- Returns:
-
getVelocityInitialRandomSource
public final RandomIfc getVelocityInitialRandomSource()
- Specified by:
getVelocityInitialRandomSource
in interfaceVelocityIfc
- Returns:
- Returns the velocity.
-
setVelocityInitialRandomSource
public final void setVelocityInitialRandomSource(RandomIfc velocity)
Description copied from interface:VelocityIfc
Sets the underlying initial random source associated with the determination of the velocity- Specified by:
setVelocityInitialRandomSource
in interfaceVelocityIfc
- Parameters:
velocity
- The velocity to set.
-
getVelocityRandomSource
public final RandomIfc getVelocityRandomSource()
- Specified by:
getVelocityRandomSource
in interfaceVelocityIfc
- Returns:
- Returns the velocity.
-
setVelocityRandomSource
public final void setVelocityRandomSource(RandomIfc velocity)
Description copied from interface:VelocityIfc
Sets the current underlying random source associated with the determination of the velocity- Specified by:
setVelocityRandomSource
in interfaceVelocityIfc
- Parameters:
velocity
- The velocity to set.
-
-