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.
  • Constructor Details

    • SimulationHelper

      public SimulationHelper()
  • Method Details

    • findFeatureValue

      @Deprecated public static List<FeatureValue> findFeatureValue(CompoundValue runtimeContext, List<Property> propertyPath, Property target)
    • getConfigElement

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

      @CheckForNull public static SimulationExecution getExecution(Project project)
      Retrieves object representing ongoing SimulationExecution, if any
    • isFeatureValueInvalid

      @CheckForNull public static Boolean isFeatureValueInvalid(FeatureValue featureValue, int index)
      Check the specified FeatureValue is invalid value or not.
      Parameters:
      featureValue - the specified FeatureValue
      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 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