Class SimulationHelper

java.lang.Object
com.nomagic.magicdraw.simulation.SimulationHelper

@OpenApiAll public final class SimulationHelper extends Object
The helper class of the cameo simulation toolkit.
Since:
CST 2021x
  • Constructor Details

    • SimulationHelper

      public SimulationHelper()
  • Method Details

    • findFeatureValue

      public static List<fUML.Semantics.Classes.Kernel.FeatureValue> findFeatureValue(fUML.Semantics.Classes.Kernel.CompoundValue runtimeContext, List<Property> propertyPath, Property target)
      Collect all featureValue objects which are matching with the given nested property path in the given runtime object.
      Parameters:
      runtimeContext - is the runtime object which is the owner of the returned runtime values, specified by propertyPath.
      propertyPath - is the property path to the requires runtime values. The first property in the propertyPath must be owned by the classifier that type the owner. to be found.
      target - target Property
      Returns:
      list of runtime values which are reside in the given 'owner' and matching to the given nested propertyPath.
    • getConfigElement

      @CheckForNull public static Element getConfigElement(@CheckForNull SimulationExecution execution)
      Gets simulation config element from simulation execution.
      Parameters:
      execution - SimulationExecution
      Returns:
      Simulation config element or null.
    • isFeatureValueInvalid

      @CheckForNull public static Boolean isFeatureValueInvalid(@CheckForNull fUML.Semantics.Classes.Kernel.FeatureValue featureValue, int index)
      Check the specified FeautureValue is invalid value or not.
      Parameters:
      featureValue - the specified FeautureValue
      index - index of the value
      Returns:
      Boolean.TRUE if featureValue is invalid. Boolean.FALSE if featureValue is valid. null if featureValue is not evaluated.
    • getAvailableSignals

      public static Set<Signal> getAvailableSignals(@CheckForNull fUML.Semantics.Classes.Kernel.StructuredValue target, @CheckForNull ExecutionEngine engine)
      Get availableSignals from the specified StructuredValue.
      Parameters:
      target - the specified StructuredValue
      engine - ExecutionEngine
      Returns:
      Set
    • getSimulationOptionValue

      @CheckForNull public static Object getSimulationOptionValue(String name, @CheckForNull Element context)
      Get the simulation option value In case there is no execution, will try to return the option value from project or environment options of the tool
      Parameters:
      name - the simulation option name constant (usually from SimulationOptions)
      Returns:
      the simulation option value, if exists