Class Fmi2SimulationEnvironment
- java.lang.Object
-
- org.intocps.maestro.framework.fmi2.Fmi2SimulationEnvironment
-
- All Implemented Interfaces:
ISimulationEnvironment,ISimulationEnvironmentTransfer
public class Fmi2SimulationEnvironment extends Object implements ISimulationEnvironment, ISimulationEnvironmentTransfer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFmi2SimulationEnvironment.FileModelDescriptionResolverstatic interfaceFmi2SimulationEnvironment.ModelDescriptionResolverstatic classFmi2SimulationEnvironment.Relationstatic classFmi2SimulationEnvironment.Variable
-
Constructor Summary
Constructors Modifier Constructor Description protectedFmi2SimulationEnvironment(Fmi2SimulationEnvironmentConfiguration msg, Fmi2SimulationEnvironment.ModelDescriptionResolver resolver)
-
Method Summary
-
-
-
Constructor Detail
-
Fmi2SimulationEnvironment
protected Fmi2SimulationEnvironment(Fmi2SimulationEnvironmentConfiguration msg, Fmi2SimulationEnvironment.ModelDescriptionResolver resolver) throws Exception
- Throws:
Exception
-
-
Method Detail
-
of
public static Fmi2SimulationEnvironment of(File file, IErrorReporter reporter) throws Exception
- Throws:
Exception
-
of
public static Fmi2SimulationEnvironment of(Fmi2SimulationEnvironmentConfiguration msg, IErrorReporter reporter, Fmi2SimulationEnvironment.ModelDescriptionResolver resolver) throws Exception
- Throws:
Exception
-
of
public static Fmi2SimulationEnvironment of(Fmi2SimulationEnvironmentConfiguration msg, IErrorReporter reporter) throws Exception
- Throws:
Exception
-
of
public static Fmi2SimulationEnvironment of(InputStream inputStream, IErrorReporter reporter) throws Exception
- Throws:
Exception
-
buildConnections
public static List<ModelConnection> buildConnections(Map<String,List<String>> connections) throws Exception
- Throws:
Exception
-
getConnectedOutputs
public List<RelationVariable> getConnectedOutputs()
- Specified by:
getConnectedOutputsin interfaceISimulationEnvironment
-
getModelTransfers
public Set<Map.Entry<String,String>> getModelTransfers()
- Specified by:
getModelTransfersin interfaceISimulationEnvironmentTransfer
-
getModelSwapInfoByInstanceName
public ModelSwapInfo getModelSwapInfoByInstanceName(String name)
-
getModelSwaps
public Set<Map.Entry<String,ModelSwapInfo>> getModelSwaps()
-
getModelSwapRelations
public Set<Fmi2SimulationEnvironment.Relation> getModelSwapRelations()
-
setLexNameToInstanceNameMapping
public void setLexNameToInstanceNameMapping(String lexName, String instanceName)
-
getInstanceByLexName
public ComponentInfo getInstanceByLexName(String lexName)
-
getVariablesToLog
public List<RelationVariable> getVariablesToLog(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:
getVariablesToLogin interfaceISimulationEnvironment- Parameters:
instanceName-- Returns:
-
getFmusWithModelDescriptions
public Set<Map.Entry<String,org.intocps.maestro.fmi.Fmi2ModelDescription>> getFmusWithModelDescriptions()
-
getInstances
public Set<Map.Entry<String,ComponentInfo>> getInstances()
- Specified by:
getInstancesin interfaceISimulationEnvironment
-
getRelations
public Set<Fmi2SimulationEnvironment.Relation> getRelations(List<org.intocps.maestro.ast.LexIdentifier> identifiers)
Finds all the relations for the given FMU Component LexIdentifiers- Specified by:
getRelationsin interfaceISimulationEnvironment- Parameters:
identifiers- FMU Component LexIdentifiers- Returns:
-
getRelations
public Set<Fmi2SimulationEnvironment.Relation> getRelations(org.intocps.maestro.ast.LexIdentifier... identifiers)
Finds all the relations for the given FMU Component LexIdentifiers- Specified by:
getRelationsin interfaceISimulationEnvironment- Parameters:
identifiers- FMU Component LexIdentifiers- Returns:
-
getRelations
public Set<Fmi2SimulationEnvironment.Relation> getRelations(String... identifiers)
- Specified by:
getRelationsin interfaceISimulationEnvironment
-
getUnitInfo
public <T extends FrameworkUnitInfo> T getUnitInfo(org.intocps.maestro.ast.LexIdentifier identifier, Framework framework)
- Specified by:
getUnitInfoin interfaceISimulationEnvironment
-
check
public void check(IErrorReporter reporter) throws Exception
- Specified by:
checkin interfaceISimulationEnvironment- Throws:
Exception
-
getModelDescription
public org.intocps.maestro.fmi.Fmi2ModelDescription getModelDescription(String name)
-
getFaultInjectionConfigurationPath
public String getFaultInjectionConfigurationPath()
-
-