Class SimulationHelper


  • @OpenApiAll
    public final class SimulationHelper
    extends java.lang.Object
    The helper class of the cameo simulation toolkit.
    Since:
    CST 2021x
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<fUML.Semantics.Classes.Kernel.FeatureValue> findFeatureValue​(fUML.Semantics.Classes.Kernel.CompoundValue runtimeContext, java.util.List<Property> propertyPath, Property target)
      Collect all featureValue objects which are matching with the given nested property path in the given runtime object.
      static java.util.Set<Signal> getAvailableSignals​(fUML.Semantics.Classes.Kernel.StructuredValue target, ExecutionEngine engine)
      Get availableSignals from the specified StructuredValue.
      static Element getConfigElement​(SimulationExecution execution)
      Gets simulation config element from simulation execution.
      static java.lang.Object getSimulationOptionValue​(java.lang.String name, 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
      static java.lang.Boolean isFeatureValueInvalid​(fUML.Semantics.Classes.Kernel.FeatureValue featureValue, int index)
      Check the specified FeautureValue is invalid value or not.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimulationHelper

        public SimulationHelper()
    • Method Detail

      • findFeatureValue

        public static java.util.List<fUML.Semantics.Classes.Kernel.FeatureValue> findFeatureValue​(fUML.Semantics.Classes.Kernel.CompoundValue runtimeContext,
                                                                                                  java.util.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 java.lang.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 java.util.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 java.lang.Object getSimulationOptionValue​(java.lang.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