Class FWSimComponentGroup

java.lang.Object
net.simplace.sim.model.FWSimComponent
net.simplace.sim.model.FWSimComponentGroup
All Implemented Interfaces:
FWSimFieldContainer

public class FWSimComponentGroup extends FWSimComponent
Author:
Andreas Enders
  • Field Details

    • iComponentMapping

      protected final HashMap<String,String> iComponentMapping
    • iComponentList

      protected final LinkedList<FWSimComponent> iComponentList
    • iSimGroupElement

      protected org.jdom2.Element iSimGroupElement
    • iInternalInputLinkMap

      protected HashMap<String,String> iInternalInputLinkMap
    • iInternalOutputLinkMap

      protected HashMap<String,String> iInternalOutputLinkMap
    • iConfigurationXMLPath

      protected String iConfigurationXMLPath
    • iSimpleName

      protected String iSimpleName
  • Constructor Details

    • FWSimComponentGroup

      public FWSimComponentGroup()
      Empty constructor reads the configuration of the component group
    • FWSimComponentGroup

      public FWSimComponentGroup(String aGroupName)
      /** 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

      protected void readConfiguration(String aConfigurationXMLPath)
      reads the component list to the simulation element - should be called from readComponentList();
      Parameters:
      aConfigurationXMLPath -
    • createVariables

      public final HashMap<String,FWSimVariable<?>> 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 interface FWSimFieldContainer
      Specified by:
      createVariables in class FWSimComponent
      Returns:
      variables from the field map
      See Also:
    • getComponentList

      public LinkedList<FWSimComponent> getComponentList()
      Returns:
      the componentList
    • getComponentMapping

      public HashMap<String,String> getComponentMapping()
      Returns:
      the componentMapping
    • getInternalInputLinkMap

      public HashMap<String,String> getInternalInputLinkMap()
      Returns:
      the internalInputLinkMap
    • getInternalOutputLinkMap

      public HashMap<String,String> getInternalOutputLinkMap()
      Returns:
      the internalOutputLinkMap
    • performOutputLinks

      public void performOutputLinks() throws SimLinkInvalidException
      performs the internal output links between the internal and external SimComponents has to be called before all external links are performed
      Throws:
      SimLinkInvalidException
    • performLinks

      protected void performLinks(HashMap<String,String> aLinkMap) throws SimLinkInvalidException
      Overrides:
      performLinks in class FWSimComponent
      Parameters:
      aLinkMap - with key = destination and value = source!
      Throws:
      SimLinkInvalidException
    • performInputLinks

      public void performInputLinks() throws SimLinkInvalidException
      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 class FWSimComponent
    • 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 class FWSimComponent
    • create

      public final void create() throws SimLinkInvalidException
      create will instantiate the sim components encapsulated in this class
      Throws:
      SimLinkInvalidException
    • getSimpleName

      public String getSimpleName()
    • toDocXML

      public org.jdom2.Element toDocXML()
      Overrides:
      toDocXML in class FWSimComponent
      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 class FWSimComponent
      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

      protected FWSimComponent clone(FWSimVarMap aVarMap)
      Specified by:
      clone in class FWSimComponent
      Returns:
      the deep clone of the SimComponent