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
FieldsModifier and TypeFieldDescriptionprotected final LinkedList<FWSimComponent>protected Stringprotected org.jdom2.Elementprotected StringFields inherited from class net.simplace.sim.model.FWSimComponent
iFieldMap, iFrequence, iInputMap, iJexlRule, iMasterComponentGroup, iName, iOrderNumber, isComponentGroup, iSimComponentElement, iSimModel, iVarMap -
Constructor Summary
ConstructorsModifierConstructorDescriptionEmpty constructor reads the configuration of the component groupFWSimComponentGroup(String aGroupName) /** Empty constructor reads the configuration of the component groupprotectedFWSimComponentGroup(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 FWSimComponentclone(FWSimVarMap aVarMap) final voidcreate()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 voidinit()The model initialization function.voidperforms the internal input links between the internal and external SimComponents has to be called AFTER all external links are performedprotected voidperformLinks(HashMap<String, String> aLinkMap) voidperforms the internal output links between the internal and external SimComponents has to be called before all external links are performedprotected final voidprocess()The main model calculation function.protected voidreads the component list to the simulation element - should be called from readComponentList();protected voidreadConfiguration(String aConfigurationXMLPath) reads the component list to the simulation element - should be called from readComponentList();org.jdom2.ElementtoDocXML()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:FWSimComponentcalled only once when the SimComponent is created. Hereby the FieldMap is filled with the interfacing fields.- Specified by:
createVariablesin interfaceFWSimFieldContainer- Specified by:
createVariablesin 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:
performLinksin 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:FWSimComponentThe model initialization function. Will be called only once, before running the model using process().- Specified by:
initin classFWSimComponent
-
process
protected final void process()Description copied from class:FWSimComponentThe main model calculation function. Is guaranteed to be called once per module-specific time step.- Specified by:
processin classFWSimComponent
-
create
create will instantiate the sim components encapsulated in this class- Throws:
SimLinkInvalidException
-
getSimpleName
-
toDocXML
public org.jdom2.Element toDocXML()- Overrides:
toDocXMLin 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:
fillTestVariablesin classFWSimComponentaDefineOrCheck- : 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:
clonein classFWSimComponent- Returns:
- the deep clone of the SimComponent
-