Package net.simplace.sim.model
Class FWSimComponentGroup
java.lang.Object
net.simplace.sim.model.FWSimComponent
net.simplace.sim.model.FWSimComponentGroup
- All Implemented Interfaces:
FWSimFieldContainer
- Author:
- Andreas Enders
-
Nested Class Summary
Nested classes/interfaces inherited from class net.simplace.sim.model.FWSimComponent
FWSimComponent.TEST_STATE
-
Field Summary
Modifier and TypeFieldDescriptionprotected final LinkedList<FWSimComponent>
protected String
protected org.jdom2.Element
protected String
Fields inherited from class net.simplace.sim.model.FWSimComponent
iFieldMap, iFrequence, iInputMap, iJexlRule, iMasterComponentGroup, iName, iOrderNumber, isComponentGroup, iSimComponentElement, iSimModel, iVarMap
-
Constructor Summary
ModifierConstructorDescriptionEmpty constructor reads the configuration of the component groupFWSimComponentGroup
(String aGroupName) /** Empty constructor reads the configuration of the component groupprotected
FWSimComponentGroup
(String aName, HashMap<String, FWSimVariable<?>> aFieldMap, HashMap<String, String> aInputMap, org.jdom2.Element aSimComponentElement, FWSimVarMap aVarMap, int aOrderNumber, LinkedList<FWSimComponent> aComponentList, HashMap<String, String> aInternalInputLinkMap, HashMap<String, String> aInternalOutputLinkMap) clone constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected FWSimComponent
clone
(FWSimVarMap aVarMap) final void
create()
create will instantiate the sim components encapsulated in this classfinal HashMap<String,
FWSimVariable<?>> called only once when the SimComponent is created.fillTestVariables
(int aParamIndex, FWSimComponent.TEST_STATE aDefineOrCheck) called for single component test to check the components algorithm.protected final void
init()
The model initialization function.void
performs the internal input links between the internal and external SimComponents has to be called AFTER all external links are performedprotected void
performLinks
(HashMap<String, String> aLinkMap) void
performs the internal output links between the internal and external SimComponents has to be called before all external links are performedprotected final void
process()
The main model calculation function.protected void
reads the component list to the simulation element - should be called from readComponentList();protected void
readConfiguration
(String aConfigurationXMLPath) reads the component list to the simulation element - should be called from readComponentList();org.jdom2.Element
toDocXML()
Methods inherited from class net.simplace.sim.model.FWSimComponent
addVariable, bind, checkCondition, createSimComponent, createSimComponent, createSimComponent, createSimComponent, doProcess, getConstantVariables, getContentType, getCreateFormXML, getDescription, getEditFormXML, getFieldMap, getFrequence, getFrequenceRuleScript, getInputs, getInputVariables, getMasterComponentGroup, getName, getOrderNumber, getOutputVariables, getVariable, getVariableField, getVarMap, initialize, isConditionCheck, isVariableAvailable, performLinks, readInputs, removeVariable, reset, runComponentTest, setVariablesDefault, toComponentLinkingXML, toGroupXML, toOutputDefinitionXML, toResourcesDataXML, toResourcesDefinitionXML, toString, toXML, writeVarInfos
-
Field Details
-
iComponentMapping
-
iComponentList
-
iSimGroupElement
protected org.jdom2.Element iSimGroupElement -
iInternalInputLinkMap
-
iInternalOutputLinkMap
-
iConfigurationXMLPath
-
iSimpleName
-
-
Constructor Details
-
FWSimComponentGroup
public FWSimComponentGroup()Empty constructor reads the configuration of the component group -
FWSimComponentGroup
/** Empty constructor reads the configuration of the component group -
FWSimComponentGroup
protected FWSimComponentGroup(String aName, HashMap<String, FWSimVariable<?>> aFieldMap, HashMap<String, String> aInputMap, org.jdom2.Element aSimComponentElement, FWSimVarMap aVarMap, int aOrderNumber, LinkedList<FWSimComponent> aComponentList, HashMap<String, String> aInternalInputLinkMap, HashMap<String, String> aInternalOutputLinkMap) clone constructor- Parameters:
aName
-aFieldMap
-aInputMap
-aSimComponentElement
-aVarMap
-aOrderNumber
-aComponentList
-aInternalInputLinkMap
-aInternalOutputLinkMap
-aInternalLinkMap
-
-
-
Method Details
-
readConfiguration
protected void readConfiguration()reads the component list to the simulation element - should be called from readComponentList();- Parameters:
aConfigurationXMLPath
-
-
readConfiguration
reads the component list to the simulation element - should be called from readComponentList();- Parameters:
aConfigurationXMLPath
-
-
createVariables
Description copied from class:FWSimComponent
called only once when the SimComponent is created. Hereby the FieldMap is filled with the interfacing fields.- Specified by:
createVariables
in interfaceFWSimFieldContainer
- Specified by:
createVariables
in classFWSimComponent
- Returns:
- variables from the field map
- See Also:
-
getComponentList
- Returns:
- the componentList
-
getComponentMapping
- Returns:
- the componentMapping
-
getInternalInputLinkMap
- Returns:
- the internalInputLinkMap
-
getInternalOutputLinkMap
- Returns:
- the internalOutputLinkMap
-
performOutputLinks
performs the internal output links between the internal and external SimComponents has to be called before all external links are performed- Throws:
SimLinkInvalidException
-
performLinks
- Overrides:
performLinks
in classFWSimComponent
- Parameters:
aLinkMap
- with key = destination and value = source!- Throws:
SimLinkInvalidException
-
performInputLinks
performs the internal input links between the internal and external SimComponents has to be called AFTER all external links are performed- Throws:
SimLinkInvalidException
-
init
protected final void init()Description copied from class:FWSimComponent
The model initialization function. Will be called only once, before running the model using process().- Specified by:
init
in classFWSimComponent
-
process
protected final void process()Description copied from class:FWSimComponent
The main model calculation function. Is guaranteed to be called once per module-specific time step.- Specified by:
process
in classFWSimComponent
-
create
create will instantiate the sim components encapsulated in this class- Throws:
SimLinkInvalidException
-
getSimpleName
-
toDocXML
public org.jdom2.Element toDocXML()- Overrides:
toDocXML
in classFWSimComponent
- Returns:
- Element of this document
- See Also:
-
fillTestVariables
public HashMap<String,FWSimVariable<?>> fillTestVariables(int aParamIndex, FWSimComponent.TEST_STATE aDefineOrCheck) called for single component test to check the components algorithm. aParamIndex: Used to set up different test cases. Start with 0 - result check with 1 aso- Specified by:
fillTestVariables
in classFWSimComponent
aDefineOrCheck
- : Use TEST_STATE.DEFINE for defining the test default values and TEST_STATE.CHECK for the accepted results- See Also:
-
net.simplace.sim.util.FWSimFieldContainer#fillTestVariables(int aParamIndex, TEST_STATE aDefineOrCheck)
-
clone
- Specified by:
clone
in classFWSimComponent
- Returns:
- the deep clone of the SimComponent
-