Package net.simplace.sim.model
Class FWSimModel
java.lang.Object
net.simplace.sim.model.FWSimModel
- All Implemented Interfaces:
Callable<FWSimVarMap>
Implemented as
Callable so that more than one can be run in same time
Can access resources via Resource Manager Singleton
Manages the VarMap
Manages the state in time and the settings of the model run
Can write outputs via Output Manager Singleton
Implemented simulation modules
Model parts are implemented from abstract simulation modules (init, clone (mit reset), process)- Author:
- Andreas Enders
-
Constructor Summary
ConstructorsConstructorDescriptionFWSimModel(HashMap<String, FWSimVariable<?>> aFieldMap, FWSimVarMap aVarMap, org.jdom2.Element aSimModelElement) creating Template Model - called for creating the model in the beginning -
Method Summary
Modifier and TypeMethodDescriptioncall()clone(FWSimVarMap aMap) getSimComponent(String aComponentName) voidinit()Initialize Model and theFWSimComponentregistered in this modelvoidreset(FWSimVarMap aNextVarMap) booleanstep()Run all model components for one day, step time and return new current date The current date from theFWSimVarMaptoString()
-
Constructor Details
-
FWSimModel
public FWSimModel(HashMap<String, FWSimVariable<?>> aFieldMap, FWSimVarMap aVarMap, org.jdom2.Element aSimModelElement) throws SimLinkInvalidExceptioncreating Template Model - called for creating the model in the beginning- Parameters:
aFieldMap-aVarMap-aSimModelElement-- Throws:
SimLinkInvalidException
-
-
Method Details
-
init
public void init()Initialize Model and theFWSimComponentregistered in this model -
call
- Specified by:
callin interfaceCallable<FWSimVarMap>- See Also:
-
step
public boolean step()Run all model components for one day, step time and return new current date The current date from theFWSimVarMap- Returns:
- is simulation continuing
-
clone
- Parameters:
aMap-- Returns:
- the cloned model instance using an already cloned new VarMap
-
reset
- Parameters:
aNextVarMap-
-
toString
-
getCurrentDate
- Returns:
- the current model date
-
getStartDate
- Returns:
- start date
-
getEndDate
- Returns:
- end date
-
getSimComponent
- Parameters:
aComponentName-- Returns:
- the SimComponent instance registered within this model
-
getFieldMap
- Returns:
- the global fieldMap - same for all model instances
-
getVarMap
- Returns:
- the individual VarMap - different for each model instance
-
getSimComponents
- Returns:
- all
FWSimComponentregistered within this model
-
getSimLinks
- Returns:
- a Map including all SimLinks
-