Class Fmi2SimulationEnvironment

  • All Implemented Interfaces:
    org.intocps.maestro.framework.core.ISimulationEnvironment

    public class Fmi2SimulationEnvironment
    extends java.lang.Object
    implements org.intocps.maestro.framework.core.ISimulationEnvironment
    • Method Detail

      • of

        public static Fmi2SimulationEnvironment of​(java.io.File file,
                                                   org.intocps.maestro.core.messages.IErrorReporter reporter)
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • of

        public static Fmi2SimulationEnvironment of​(java.io.InputStream inputStream,
                                                   org.intocps.maestro.core.messages.IErrorReporter reporter)
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • buildConnections

        public static java.util.List<ModelConnection> buildConnections​(java.util.Map<java.lang.String,​java.util.List<java.lang.String>> connections)
                                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getConnectedOutputs

        public java.util.List<RelationVariable> getConnectedOutputs()
        Specified by:
        getConnectedOutputs in interface org.intocps.maestro.framework.core.ISimulationEnvironment
      • setLexNameToInstanceNameMapping

        public void setLexNameToInstanceNameMapping​(java.lang.String lexName,
                                                    java.lang.String instanceName)
      • getInstanceByLexName

        public ComponentInfo getInstanceByLexName​(java.lang.String lexName)
      • getVariablesToLog

        public java.util.List<RelationVariable> getVariablesToLog​(java.lang.String instanceName)
        Retrieves all variables that should be logged for the given instance. This is a combination of specified logvariables and connected outputs
        Specified by:
        getVariablesToLog in interface org.intocps.maestro.framework.core.ISimulationEnvironment
        Parameters:
        instanceName -
        Returns:
      • getFmusWithModelDescriptions

        public java.util.Set<java.util.Map.Entry<java.lang.String,​org.intocps.maestro.fmi.Fmi2ModelDescription>> getFmusWithModelDescriptions()
      • getInstances

        public java.util.Set<java.util.Map.Entry<java.lang.String,​ComponentInfo>> getInstances()
        Specified by:
        getInstances in interface org.intocps.maestro.framework.core.ISimulationEnvironment
      • getFmuToUri

        public java.util.Set<java.util.Map.Entry<java.lang.String,​java.net.URI>> getFmuToUri()
      • getUriFromFMUName

        public java.net.URI getUriFromFMUName​(java.lang.String fmuName)
      • getLogLevels

        public java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getLogLevels()
      • getRelations

        public java.util.Set<Fmi2SimulationEnvironment.Relation> getRelations​(java.util.List<org.intocps.maestro.ast.LexIdentifier> identifiers)
        Finds all the relations for the given FMU Component LexIdentifiers
        Specified by:
        getRelations in interface org.intocps.maestro.framework.core.ISimulationEnvironment
        Parameters:
        identifiers - FMU Component LexIdentifiers
        Returns:
      • getRelations

        public java.util.Set<Fmi2SimulationEnvironment.Relation> getRelations​(org.intocps.maestro.ast.LexIdentifier... identifiers)
        Finds all the relations for the given FMU Component LexIdentifiers
        Specified by:
        getRelations in interface org.intocps.maestro.framework.core.ISimulationEnvironment
        Parameters:
        identifiers - FMU Component LexIdentifiers
        Returns:
      • getRelations

        public java.util.Set<Fmi2SimulationEnvironment.Relation> getRelations​(java.lang.String... identifiers)
        Specified by:
        getRelations in interface org.intocps.maestro.framework.core.ISimulationEnvironment
      • getUnitInfo

        public <T extends org.intocps.maestro.framework.core.FrameworkUnitInfo> T getUnitInfo​(org.intocps.maestro.ast.LexIdentifier identifier,
                                                                                              org.intocps.maestro.core.Framework framework)
        Specified by:
        getUnitInfo in interface org.intocps.maestro.framework.core.ISimulationEnvironment
      • check

        public void check​(org.intocps.maestro.core.messages.IErrorReporter reporter)
                   throws java.lang.Exception
        Specified by:
        check in interface org.intocps.maestro.framework.core.ISimulationEnvironment
        Throws:
        java.lang.Exception
      • getModelDescription

        public org.intocps.maestro.fmi.Fmi2ModelDescription getModelDescription​(java.lang.String name)
      • getFaultInjectionConfigurationPath

        public java.lang.String getFaultInjectionConfigurationPath()