Class FWSimSimulation

java.lang.Object
net.simplace.sim.FWSimSimulation
All Implemented Interfaces:
Callable<FWSimVarMap>

public final class FWSimSimulation extends Object implements Callable<FWSimVarMap>
A simulation is the runnable and configured simulation model. It runs in an own Thread implementing the Runnable interface. It consists of a Name, ProjectID of the including project, FWSimModel and a List of FWSimVariables that the simulation is able to store as start configuration.
Author:
Andreas Enders
  • Constructor Details

    • FWSimSimulation

      public FWSimSimulation(FWSimVarMap aVarMap, FWSimModel aModel)
      Default constructor for the simulation object. Simulation signifies one run of the model containing all needed configurations. They can be run simultaneously if in same project.
      Parameters:
      aVarMap -
      aModel -
      aFilterListHeader - only initial Values in this filter list are stored as initial values
  • Method Details

    • call

      public FWSimVarMap call()
      called by the Thread to start it running
      Specified by:
      call in interface Callable<FWSimVarMap>
      See Also:
    • init

      public void init()
      Initialize a simulation run
    • finish

      public void finish()
      Finish a model run
    • registerResultCache

      public void registerResultCache(FWSimResultCache aCache)
      Parameters:
      aCache -
    • setValue

      public void setValue(String aColName, FWSimVariable.DATA_TYPE aDataType, Object aObject)
      sets value to the solution. Values can be used in modeling process
      Parameters:
      aColName -
      aDataType -
      aObject -
    • getVarMap

      public FWSimVarMap getVarMap()
      Returns:
      the SimVarMap of the implemented Model as a template
    • getName

      public String getName()
      Returns:
      the id of the simulation
    • getID

      public String getID()
      Returns:
      the iD
    • getVariableValue

      public Object getVariableValue(String aName)
      Parameters:
      aName -
      Returns:
      the Value of the end state (after model ended)
    • getResultCache

      public FWSimResultCache getResultCache(String aName)
      Parameters:
      aName -
      Returns:
      the Result references
    • getCacheNames

      public Set<String> getCacheNames()
      Returns:
      the Result Cache Names
    • getModel

      public FWSimModel getModel()
      Returns:
      the running Model
    • clone

      public FWSimSimulation clone(Integer aSimulationNumber)
      Parameters:
      aSimulationNumber -
      Returns:
      a clone of FWSimSimulation object
    • equals

      public boolean equals(Object aObj)
      Overrides:
      equals in class Object
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object