Class FWSimSession

java.lang.Object
net.simplace.sim.FWSimSession

public final class FWSimSession extends Object
Author:
Andreas Enders
  • Constructor Details

    • FWSimSession

      public FWSimSession(org.jdom2.Element aSolutionElement, FWSimVarMap aVarMap, Object[][] aParameters, String aSessionName, FileData aSolutionFile)
      Parameters:
      aSolutionElement -
      aVarMap -
      aSessionName -
      aSolutionFile -
      aApplicationMode -
    • FWSimSession

      public FWSimSession(FWSimSolution aSolution, FileData aSolutionFile)
      Parameters:
      aSolution -
      aSolutionFile -
      aApplicationMode -
  • Method Details

    • getSolutionFile

      public FileData getSolutionFile()
      Returns:
    • getProjectFile

      public FileData getProjectFile()
      Returns:
    • getDataFrame

      public FWSimDataframe getDataFrame()
      Returns:
    • initProjects

      public void initProjects(FWSimVarMap aVarMap)
      Parameters:
      aVarMap -
    • getSolution

      public FWSimSolution getSolution()
      Returns:
      the solution
    • getPoolInterface

      public DatabaseInterface getPoolInterface()
      Returns:
      the pool interface
    • getSessionID

      public String getSessionID()
      Returns:
      a unique session id for unique folders etc.
    • getProjectControler

      public FWSimulationController getProjectControler()
      Returns:
      the project controller
    • getProjectList

      public List<FWSimProject> getProjectList()
      Returns:
      list of the projects
    • getProject

      public FWSimProject getProject(String aProjectID)
      Parameters:
      aProjectID -
      Returns:
      the Project
    • run

      public ArrayList<FWSimProject> run() throws Exception
      Returns:
      The readily run projects
      Throws:
      Exception
    • postprocess

      public void postprocess()
    • getOutputManager

      public FWSimOutputManager getOutputManager()
      Returns:
      the output manager
    • getPostProcessManager

      public FWSimPostProcessManager getPostProcessManager()
      Returns:
      the output manager
    • getResourceManager

      public FWSimResourceManager getResourceManager()
      Returns:
      the Resource manager
    • getSyncManager

      public FWSimSyncManager getSyncManager()
      Returns:
      the Sync manager
    • getChecker

      public FWCheckHelper getChecker()
      Returns:
      the used checker for this session
    • runProject

      public List<FWSimSimulation> runProject(FWSimProject aProject) throws Exception
      Make sure that output writers are running and system is shut down after running all projects
      Parameters:
      aProject - to be run
      Returns:
      the list of simulations of this project
      Throws:
      Exception
    • runSimulations

      public void runSimulations(List<FWSimSimulation> aSimulationList, boolean aSelectSimulation) throws Exception
      Make sure that output writers are running and system is shut down after running all projects
      Parameters:
      aProject - to be run
      aSimulationList -
      aSelectSimulation -
      Throws:
      Exception
    • registerModelListener

      public void registerModelListener(FWSimulationListener aModelListener)
      Model listener gets Model Event with the current Model
      Parameters:
      aModelListener -
    • removeModelListener

      public void removeModelListener(FWSimulationListener aModelListener)
      Model listener gets Model Event with the current Model
      Parameters:
      aModelListener -
    • getModelListeners

      public List<FWSimulationListener> getModelListeners()
      Returns:
      the modelListeners
    • handleModelErrorEvent

      public void handleModelErrorEvent(FWSimulationErrorEvent aModelEvent)
      Parameters:
      aModelEvent -
    • simulationStarted

      public void simulationStarted(FWSimSimulation aFWSimSimulation, Integer aPercentage)
      Parameters:
      aFWSimSimulation -
      aPercentage -
    • simulationEnded

      public void simulationEnded(FWSimSimulation aFWSimSimulation, Integer aPercentage)
      Parameters:
      aFWSimSimulation - If you use "modelEnded" to remove the actual listener you can be sure that "ConcurrentModificationException" is prevented.
      aPercentage -
    • projectEnded

      public void projectEnded(FWSimProject aFWSimProject, Integer aPercentage)
      Parameters:
      aFWSimProject -
      aPercentage - If you use "modelEnded" to remove the actual listener you can be sure that "ConcurrentModificationException" is prevented.
    • iterationEnded

      public void iterationEnded(FWSimulationControlCache aControlCache)
      Parameters:
      aControlCache -
      aPercentage - If you use "modelEnded" to remove the actual listener you can be sure that "ConcurrentModificationException" is prevented.
    • finalize

      public void finalize() throws Exception
      If when simulation ended finalize sets simulation to inactive
      Overrides:
      finalize in class Object
      Throws:
      Exception
    • clone

      public FWSimSession clone()
      If when simulation ended finalize sets simulation to inactive
      Overrides:
      clone in class Object
    • isActive

      public boolean isActive()
      Returns:
      the isActive
    • setInActive

      public void setInActive()
      sets simulation to inactive
    • setActive

      public void setActive()
      sets simulation to active
    • getControlCache

      public FWSimulationControlCache getControlCache()
      sets simulation to active
      Returns:
      The Control cache
    • toString

      public String toString()
      Overrides:
      toString in class Object