Klasse JuliaWorkarounds

java.lang.Object
net.simplace.sim.wrapper.util.JuliaWorkarounds

public class JuliaWorkarounds extends Object
Some workarounds needed by the Julia language scripts to access SimplaceWrapper
Autor:
Gunther Krauss
  • Konstruktordetails

    • JuliaWorkarounds

      public JuliaWorkarounds()
  • Methodendetails

    • castArrayToObject

      public static Object castArrayToObject(Object[] array)
      Helper function when wrappers in other languages can't typecast arrays to objects.
      Parameter:
      array - an Array
      Gibt zurück:
      the Array as Object
    • combineNamesValues

      public static Object[][] combineNamesValues(String[] aNames, Object[] aValues)
      Creates a two dimensional object array from an array of strings and array of values The resulting object n entries of lenght two (sub)objects - first entry has the name, second the value.
      Parameter:
      aNames - Array with names
      aValues - Array with values
      Gibt zurück:
      two dimensional object array
    • callCreateSimulation

      public static FWSimSimulation callCreateSimulation(SimplaceWrapper aWrapper, String[] aNames, Object[] aValues) throws Exception
      Calls the wrapper's createSimulation with parameterMap constructed from names and values array.
      Parameter:
      aWrapper - - instance of SimplaceWrapper
      aNames - - array of variable names
      aValues - - array of values
      Gibt zurück:
      simulation
      Löst aus:
      Exception
    • callPrepareSession

      public static FWSimSession callPrepareSession(SimplaceWrapper aWrapper, String aProject, String aSolution, String[] aNames, Object[] aValues)
      Calls the wrapper's createSimulation with parameterMap constructed from names and values array.
      Parameter:
      aWrapper - - instance of SimplaceWrapper
      aProject - - path to proj.xml
      aSolution - - path to sol.xml
      aNames - - array of variable names
      aValues - - array of values
      Gibt zurück:
      session
    • callSetSimulationValues

      public static void callSetSimulationValues(SimplaceWrapper aWrapper, int aSimulationQueueIndex, String[] aNames, Object[] aValues)
      Calls the wrapper's setSimulationValues with parameterMap constructed from names and values array.
      Parameter:
      aWrapper - - instance of SimplaceWrapper
      aSimulationQueueIndex - - index of the simulation in the queue
      aNames - - array of variable names
      aValues - - array of values
    • callStepSpecific

      public static DataContainer callStepSpecific(SimplaceWrapper aWrapper, int aSimulationQueueIndex, String[] aNames, Object[] aValues, int aStepCount) throws Exception
      Calls the wrapper's stepSpecific with parameterMap constructed from names and values array.
      Parameter:
      aWrapper - - instance of SimplaceWrapper
      aSimulationQueueIndex - - index of the simulation in the queue
      aNames - - array of variable names
      aValues - - array of values
      aStepCount - - number of simulation steps to perform
      Gibt zurück:
      varMap with simulated values of last step
      Löst aus:
      Exception
    • callStepSpecific

      public static DataContainer callStepSpecific(SimplaceWrapper aWrapper, int aSimulationQueueIndex, String[] aNames, Object[] aValues, String[] aOutputFilterArray, int aStepCount) throws Exception
      Calls the wrapper's stepSpecific with parameterMap constructed from names and values array.
      Parameter:
      aWrapper - - instance of SimplaceWrapper
      aSimulationQueueIndex - - index of the simulation in the queue
      aNames - - array of variable names
      aValues - - array of values
      aOutputFilterArray - - array of variable names that should be included into the result
      aStepCount - - number of simulation steps to perform
      Gibt zurück:
      varMap with simulated values of last step
      Löst aus:
      Exception
    • callStepAll

      public static DataContainer[] callStepAll(SimplaceWrapper aWrapper, int aStepCount, boolean aParallelized) throws Exception
      Calls the wrapper's stepAll with parameterMap constructed from names and values array.
      Parameter:
      aWrapper - - instance of SimplaceWrapper
      aStepCount - - number of simulation steps to perform
      aParallelized - - if true it uses parallel Streams - experimental!
      Gibt zurück:
      array of varMaps with simulated values of last step
      Löst aus:
      Exception
    • callStepAll

      public static DataContainer[] callStepAll(SimplaceWrapper aWrapper, String[] aOutputFilterArray, int aStepCount, boolean aParallelized) throws Exception
      Calls the wrapper's stepAll with parameterMap constructed from names and values array.
      Parameter:
      aWrapper - - instance of SimplaceWrapper
      aOutputFilterArray - - array of variable names that should be included into the result
      aStepCount - - number of simulation steps to perform
      aParallelized - - if true it uses parallel Streams - experimental!
      Gibt zurück:
      array of varMaps with simulated values of last step
      Löst aus:
      Exception