diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index b7bf06c43..88c916b41 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -5,9 +5,8 @@ name: Java CI with Maven
on:
push:
- branches: [ 1.x.x-development ]
+
pull_request:
- branches: [ 1.x.x-development ]
@@ -18,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [ubuntu-18.04, macos-10.15, windows-2019]
+ os: [ubuntu-20.04, macos-latest, windows-2019]
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
@@ -30,18 +29,8 @@ jobs:
- name: Maven Test
run: mvn test
- name: Artifact Name
- if: runner.os == 'macOS'
- run: |
- JARPATH=$(find . -type f -iname 'coe-*-SNAPSHOT-jar-with-dependencies.jar')
- echo "Found jar path: ${JARPATH}"
- echo "Setting artifactpath to ${JARPATH}"
- echo "::set-env name=artifactpath::${JARPATH}"
- JARNAME=$(basename $JARPATH)
- echo "Setting artifactname to ${JARNAME}"
- echo "::set-env name=artifactname::${JARNAME}"
- - name: Upload artifact
- uses: actions/upload-artifact@v2
- if: runner.os == 'macOS'
+ uses: actions/upload-artifact@v3
with:
- name: ${{env.artifactname}}
- path: ${{env.artifactpath}}
+ name: maestro.jar
+ path: orchestration/coe/target/coe-*-SNAPSHOT-jar-with-dependencies.jar
+ retention-days: 5
diff --git a/.gitignore b/.gitignore
index 734f23fbf..cb94c2245 100644
--- a/.gitignore
+++ b/.gitignore
@@ -102,3 +102,8 @@ orchestration/coe/interpreter.log*
repository
orchestration/coe/src/main/resources/coe-protocol/.texlipse
orchestration/coe/src/main/java/META-INF/MANIFEST.MF
+simulate.json
+initialize.json
+outputs.csv
+.java-version
+orchestration/coe/failed
diff --git a/Jenkinsfile b/Jenkinsfile
deleted file mode 100644
index 4cea74169..000000000
--- a/Jenkinsfile
+++ /dev/null
@@ -1,66 +0,0 @@
-node {
- try
- {
-
-
- stage ('Checkout'){
- checkout scm
- }
-
- // Mark the code build
- stage ('Build'){
-
- withMaven(mavenLocalRepo: '.repository', mavenSettingsFilePath: "${env.MVN_SETTINGS_PATH}") {
-
- lock('FMU-SHM') {
- // Run the maven build
- sh "mvn clean install -U -Phtlatex -Dsimulation.profile.executiontime=true"
- }
-
- step([$class: 'ArtifactArchiver', artifacts: '**/target/*.jar', fingerprint: true])
- step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml'])
- step([$class: 'JacocoPublisher'])
- step([$class: 'TasksPublisher', canComputeNew: false, defaultEncoding: '', excludePattern: '', healthy: '', high: 'FIXME', ignoreCase: true, low: '', normal: 'TODO', pattern: '', unHealthy: ''])
- }
- }
-
- stage ('Publish Artifactory'){
-
- if (env.BRANCH_NAME == 'development') {
-
- def server = Artifactory.server "-844406945@1404457436085"
- def buildInfo = Artifactory.newBuildInfo()
- buildInfo.env.capture = true
- //buildInfo.env.filter.addExclude("org/destecs/ide/**")
- def rtMaven = Artifactory.newMavenBuild()
- rtMaven.tool = "Maven 3.1.1" // Tool name from Jenkins configuration
- rtMaven.opts = "-Xmx1024m -XX:MaxPermSize=256M"
- rtMaven.deployer releaseRepo:'into-cps', snapshotRepo:'into-cps', server: server
-
- rtMaven.run pom: 'pom.xml', goals: 'install', buildInfo: buildInfo
-
- //get rid of old snapshots only keep then for a short amount of time
- //Retention is commercial license only
- //buildInfo.retention maxBuilds: 5, maxDays: 7, deleteBuildArtifacts: true
-
- // Publish build info.
- server.publishBuildInfo buildInfo
- }
- }
-
-
- } catch (any) {
- currentBuild.result = 'FAILURE'
- throw any //rethrow exception to prevent the build from proceeding
- } finally {
-
- stage('Reporting'){
-
- // Notify on build failure using the Email-ext plugin
- emailext(body: '${DEFAULT_CONTENT}', mimeType: 'text/html',
- replyTo: '$DEFAULT_REPLYTO', subject: '${DEFAULT_SUBJECT}',
- to: emailextrecipients([[$class: 'CulpritsRecipientProvider'],
- [$class: 'RequesterRecipientProvider']]))
- }}
-}
-
diff --git a/README.md b/README.md
index 7232bfc16..b2d44ec63 100644
--- a/README.md
+++ b/README.md
@@ -98,3 +98,4 @@ for more see https://github.com/overturetool/overture/wiki/Release-Process
remember to create github release from the released tag and upload: `target/checkout/orchestration/coe/target/coe-0.0.2-jar-with-dependencies.jar`.
Furthermore, remember to update the download.json file in the development branch of INTO-CPS/github.io
+
diff --git a/orchestration/coe/pom.xml b/orchestration/coe/pom.xml
index 9c737db63..b902911b3 100644
--- a/orchestration/coe/pom.xml
+++ b/orchestration/coe/pom.xml
@@ -10,12 +10,14 @@
2.9.10.3
+ 2.20.0
org.into-cps.orchestration
coe
The orchestration engine
+
scala-tools.org
@@ -90,6 +92,12 @@
org.into-cps.fmi
jnifmuapi
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
@@ -131,12 +139,6 @@
test
-
-
- log4j
- apache-log4j-extras
- 1.2.17
-
@@ -175,7 +177,43 @@
test
+
+ org.apache.logging.log4j
+ log4j-api
+ ${log4j2.version}
+
+
+ org.apache.logging.log4j
+ log4j-core
+ ${log4j2.version}
+
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.logging.log4j
+ log4j-slf4j2-impl
+ ${log4j2.version}
+ runtime
+
+
+ org.apache.logging.log4j
+ log4j-slf4j-impl
+ ${log4j2.version}
+
+
+ org.slf4j
+ slf4j-api
+ 2.0.7
+
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/BasicInitializer.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/BasicInitializer.java
index 8ba9cf8bf..281d73da3 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/BasicInitializer.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/BasicInitializer.java
@@ -34,17 +34,7 @@
*/
package org.intocps.orchestration.coe;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.*;
-import java.util.function.Function;
-import java.util.stream.Collector;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
import org.intocps.fmi.*;
-import org.intocps.orchestration.coe.config.ModelConnection;
import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance;
import org.intocps.orchestration.coe.config.ModelParameter;
import org.intocps.orchestration.coe.cosim.base.CoSimInitializer;
@@ -63,11 +53,14 @@
import org.intocps.orchestration.coe.util.Util;
import org.jgrapht.DirectedGraph;
import org.jgrapht.alg.CycleDetector;
-import org.jgrapht.ext.DOTExporter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.xml.xpath.XPathExpressionException;
+import java.util.*;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
public class BasicInitializer implements CoSimInitializer
{
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/FmuFactory.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/FmuFactory.java
index f04bcd649..f42d0fbc7 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/FmuFactory.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/FmuFactory.java
@@ -34,11 +34,6 @@
*/
package org.intocps.orchestration.coe;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.URI;
-
import org.apache.commons.io.FileUtils;
import org.intocps.fmi.FmuInvocationException;
import org.intocps.fmi.IFmu;
@@ -47,6 +42,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.URI;
+
public class FmuFactory
{
final static Logger logger = LoggerFactory.getLogger(FmuFactory.class);
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/IFmuFactory.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/IFmuFactory.java
index 90bc7aab7..6093d16d1 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/IFmuFactory.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/IFmuFactory.java
@@ -34,11 +34,11 @@
*/
package org.intocps.orchestration.coe;
+import org.intocps.fmi.IFmu;
+
import java.io.File;
import java.net.URI;
-import org.intocps.fmi.IFmu;
-
public interface IFmuFactory
{
/**
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/BasicFixedStepSizeCalculator.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/BasicFixedStepSizeCalculator.scala
index 8c386d4af..c9be4e635 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/BasicFixedStepSizeCalculator.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/BasicFixedStepSizeCalculator.scala
@@ -35,12 +35,9 @@
package org.intocps.orchestration.coe.cosim
import org.intocps.orchestration.coe.config.ModelConnection
-import org.intocps.orchestration.coe.config.ModelConnection.Variable
-import org.intocps.orchestration.coe.scala.CoeObject
-import org.slf4j.LoggerFactory
-import scala.collection.JavaConverters._
-import org.intocps.orchestration.coe.scala.VariableResolver
import org.intocps.orchestration.coe.cosim.base.FmiSimulationInstance
+import org.intocps.orchestration.coe.scala.{CoeObject, VariableResolver}
+import org.slf4j.LoggerFactory
class BasicFixedStepSizeCalculator(val size: Double) extends CoSimStepSizeCalculator {
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/CoSimStepSizeCalculator.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/CoSimStepSizeCalculator.scala
index ba4af34d5..5450cfe8f 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/CoSimStepSizeCalculator.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/CoSimStepSizeCalculator.scala
@@ -34,11 +34,9 @@
*/
package org.intocps.orchestration.coe.cosim
-import org.intocps.fmi.IFmiComponent
-import org.intocps.orchestration.coe.scala.CoeObject
import org.intocps.orchestration.coe.config.ModelConnection
-import org.intocps.orchestration.coe.scala.VariableResolver
import org.intocps.orchestration.coe.cosim.base.FmiSimulationInstance
+import org.intocps.orchestration.coe.scala.{CoeObject, VariableResolver}
/**
* Interface that provides features to determine a step size which can be taken
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/ExternalSignalsStepSizeCalculator.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/ExternalSignalsStepSizeCalculator.scala
index bb6dd0700..8bcd3fa6d 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/ExternalSignalsStepSizeCalculator.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/ExternalSignalsStepSizeCalculator.scala
@@ -37,8 +37,8 @@ package org.intocps.orchestration.coe.cosim
import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance
import org.intocps.orchestration.coe.cosim.base.FmiSimulationInstance
-import org.intocps.orchestration.coe.scala.{Coe, VariableResolver}
import org.intocps.orchestration.coe.scala.CoeObject.{GlobalState, Inputs, Outputs}
+import org.intocps.orchestration.coe.scala.{Coe, VariableResolver}
/**
* Created by kel on 04/10/2017.
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/VariableStepSizeCalculator.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/VariableStepSizeCalculator.scala
index 6b324fc3d..474a96329 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/VariableStepSizeCalculator.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/VariableStepSizeCalculator.scala
@@ -34,30 +34,19 @@
*/
package org.intocps.orchestration.coe.cosim
-import java.lang
-
-import org.intocps.orchestration.coe.json.InitializationMsgJson
-
-import scala.collection.JavaConverters.mapAsJavaMapConverter
-import scala.collection.JavaConverters.mapAsScalaMapConverter
+import org.intocps.fmi.Fmi2Status
import org.intocps.orchestration.coe.config.ModelConnection
import org.intocps.orchestration.coe.config.ModelConnection.Variable
-import org.intocps.orchestration.coe.scala.CoeObject
+import org.intocps.orchestration.coe.cosim.base.FmiSimulationInstance
+import org.intocps.orchestration.coe.cosim.varstep.{StepsizeCalculator, StepsizeInterval}
+import org.intocps.orchestration.coe.json.InitializationMsgJson
+import org.intocps.orchestration.coe.json.InitializationMsgJson.Constraint
+import org.intocps.orchestration.coe.scala.CoeObject.FmiInstanceConfigScalaWrapper
+import org.intocps.orchestration.coe.scala.{CoeObject, VariableResolver}
import org.slf4j.LoggerFactory
-import org.intocps.orchestration.coe.cosim.varstep.StepsizeCalculator
-import InitializationMsgJson.Constraint
-import org.intocps.orchestration.coe.cosim.varstep.StepsizeInterval
-import org.intocps.orchestration.coe.scala.VariableResolver
import scala.collection.JavaConversions._
-import org.intocps.orchestration.coe.scala.CoeObject.FmiInstanceConfigScalaWrapper
-import org.intocps.orchestration.coe.cosim.varstep.StepsizeCalculator
-import org.intocps.orchestration.coe.cosim.base.FmiSimulationInstance
-import org.intocps.orchestration.coe.cosim.varstep.StepsizeCalculator
-import InitializationMsgJson.Constraint
-import org.intocps.fmi.Fmi2Status
-
-import scala.collection.immutable
+import scala.collection.JavaConverters.mapAsJavaMapConverter
class VariableStepSizeCalculator(constraints: java.util.Set[Constraint],
val stepsizeInterval: StepsizeInterval,
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/base/CoSimInitializer.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/base/CoSimInitializer.java
index da0e5fdca..673cab96d 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/base/CoSimInitializer.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/base/CoSimInitializer.java
@@ -34,15 +34,15 @@
*/
package org.intocps.orchestration.coe.cosim.base;
-import java.util.List;
-import java.util.Map;
-
import org.intocps.fmi.FmuInvocationException;
import org.intocps.orchestration.coe.AbortSimulationException;
-import org.intocps.orchestration.coe.config.*;
import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance;
+import org.intocps.orchestration.coe.config.ModelParameter;
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.ScalarVariable;
+import java.util.List;
+import java.util.Map;
+
/**
* initializer interface responsible for initializing all components. Methods on this interface will be called in
* the FMI initialization state
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/base/CoSimMasterAlgorithm.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/base/CoSimMasterAlgorithm.java
index 6b8c49e0a..aca748867 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/base/CoSimMasterAlgorithm.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/base/CoSimMasterAlgorithm.java
@@ -34,10 +34,10 @@
*/
package org.intocps.orchestration.coe.cosim.base;
-import java.util.Set;
-
import org.intocps.fmi.IFmiComponent;
+import java.util.Set;
+
/**
* The master algorithm on the COE that is responsible for calling
* {@link CoSimInitializer} looping over {@link CoSimStepSizeCalculator}
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/base/FmiInstanceConfig.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/base/FmiInstanceConfig.java
index 85577ba71..ca1456221 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/base/FmiInstanceConfig.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/base/FmiInstanceConfig.java
@@ -34,11 +34,11 @@
*/
package org.intocps.orchestration.coe.cosim.base;
-import java.util.List;
-
import org.intocps.orchestration.coe.modeldefinition.ModelDescription;
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.ScalarVariable;
+import java.util.List;
+
/**
* Temporary class for a fmi component model description, It needs to fetch and cache the model description for faster
* simulation access
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/CurrentSolutionPoint.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/CurrentSolutionPoint.java
index d88f7ad55..61f06928f 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/CurrentSolutionPoint.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/CurrentSolutionPoint.java
@@ -42,15 +42,15 @@
*/
package org.intocps.orchestration.coe.cosim.varstep;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Observable;
-
import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance;
import org.intocps.orchestration.coe.config.ModelConnection.Variable;
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.ScalarVariable;
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.Types;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Observable;
+
public class CurrentSolutionPoint extends Observable
{
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/StepsizeCalculator.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/StepsizeCalculator.java
index 19d3aa8ce..6b1fe1f94 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/StepsizeCalculator.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/StepsizeCalculator.java
@@ -42,14 +42,6 @@
*/
package org.intocps.orchestration.coe.cosim.varstep;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Vector;
-
import org.intocps.orchestration.coe.AbortSimulationException;
import org.intocps.orchestration.coe.config.ModelConnection;
import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance;
@@ -66,6 +58,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.*;
+
public class StepsizeCalculator
{
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/ConstraintHandlerFactory.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/ConstraintHandlerFactory.java
index 3cc36993c..7ee5c228d 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/ConstraintHandlerFactory.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/ConstraintHandlerFactory.java
@@ -42,13 +42,6 @@
*/
package org.intocps.orchestration.coe.cosim.varstep.constraint;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Observable;
-import java.util.Set;
-
import org.intocps.orchestration.coe.AbortSimulationException;
import org.intocps.orchestration.coe.config.ModelConnection.Variable;
import org.intocps.orchestration.coe.cosim.varstep.StepsizeInterval;
@@ -59,6 +52,8 @@
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.Types;
import org.slf4j.Logger;
+import java.util.*;
+
public class ConstraintHandlerFactory
{
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/boundeddifference/BoundedDifferenceCalculator.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/boundeddifference/BoundedDifferenceCalculator.java
index a2b0d4c93..db1b4f36f 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/boundeddifference/BoundedDifferenceCalculator.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/boundeddifference/BoundedDifferenceCalculator.java
@@ -42,14 +42,14 @@
*/
package org.intocps.orchestration.coe.cosim.varstep.constraint.boundeddifference;
+import org.intocps.orchestration.coe.config.ModelConnection.Variable;
+import org.intocps.orchestration.coe.cosim.varstep.valuetracker.DoubleValueTracker;
+
import java.util.Collections;
import java.util.List;
import java.util.Observable;
import java.util.Vector;
-import org.intocps.orchestration.coe.config.ModelConnection.Variable;
-import org.intocps.orchestration.coe.cosim.varstep.valuetracker.DoubleValueTracker;
-
public class BoundedDifferenceCalculator
{
private List tracker = new Vector();
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/boundeddifference/BoundedDifferenceHandler.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/boundeddifference/BoundedDifferenceHandler.java
index 57a1dd971..8aecd9efc 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/boundeddifference/BoundedDifferenceHandler.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/boundeddifference/BoundedDifferenceHandler.java
@@ -42,12 +42,9 @@
*/
package org.intocps.orchestration.coe.cosim.varstep.constraint.boundeddifference;
-import java.util.Observable;
-import java.util.Observer;
-
import org.intocps.orchestration.coe.cosim.varstep.CurrentSolutionPoint;
-import org.intocps.orchestration.coe.cosim.varstep.StepsizeInterval;
import org.intocps.orchestration.coe.cosim.varstep.CurrentSolutionPoint.Operation;
+import org.intocps.orchestration.coe.cosim.varstep.StepsizeInterval;
import org.intocps.orchestration.coe.cosim.varstep.constraint.ConstraintHandler;
import org.intocps.orchestration.coe.cosim.varstep.constraint.boundeddifference.stepsize.BdStepsizeAdjustmentStrategy;
import org.intocps.orchestration.coe.cosim.varstep.constraint.boundeddifference.stepsize.SimpleBdStepsizeAdjustmentStrategy;
@@ -56,6 +53,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Observable;
+import java.util.Observer;
+
public class BoundedDifferenceHandler implements Observer, ConstraintHandler
{
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/boundeddifference/stepsize/SimpleBdStepsizeAdjustmentStrategy.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/boundeddifference/stepsize/SimpleBdStepsizeAdjustmentStrategy.java
index 6bd74bb7d..82a73a705 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/boundeddifference/stepsize/SimpleBdStepsizeAdjustmentStrategy.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/boundeddifference/stepsize/SimpleBdStepsizeAdjustmentStrategy.java
@@ -42,15 +42,15 @@
*/
package org.intocps.orchestration.coe.cosim.varstep.constraint.boundeddifference.stepsize;
-import java.util.Observable;
-import java.util.Observer;
-
import org.intocps.orchestration.coe.cosim.varstep.CurrentSolutionPoint;
import org.intocps.orchestration.coe.cosim.varstep.CurrentSolutionPoint.Operation;
import org.intocps.orchestration.coe.cosim.varstep.StepsizeInterval;
import org.intocps.orchestration.coe.cosim.varstep.constraint.boundeddifference.BoundedDifferenceCalculator;
import org.intocps.orchestration.coe.json.InitializationMsgJson.Constraint;
+import java.util.Observable;
+import java.util.Observer;
+
public class SimpleBdStepsizeAdjustmentStrategy implements Observer,
BdStepsizeAdjustmentStrategy
{
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/samplingrate/SamplingRateHandler.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/samplingrate/SamplingRateHandler.java
index 661a3fa83..2d42db3de 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/samplingrate/SamplingRateHandler.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/samplingrate/SamplingRateHandler.java
@@ -42,14 +42,14 @@
*/
package org.intocps.orchestration.coe.cosim.varstep.constraint.samplingrate;
-import java.util.Observable;
-import java.util.Observer;
-
import org.intocps.orchestration.coe.cosim.varstep.CurrentSolutionPoint;
import org.intocps.orchestration.coe.cosim.varstep.StepsizeInterval;
import org.intocps.orchestration.coe.cosim.varstep.constraint.ConstraintHandler;
import org.intocps.orchestration.coe.json.InitializationMsgJson.Constraint;
+import java.util.Observable;
+import java.util.Observer;
+
public class SamplingRateHandler implements Observer, ConstraintHandler
{
private Double currentTime;
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/zerocrossing/ZerocrossingHandler.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/zerocrossing/ZerocrossingHandler.java
index 53907a1a0..166ebbd26 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/zerocrossing/ZerocrossingHandler.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/constraint/zerocrossing/ZerocrossingHandler.java
@@ -42,9 +42,6 @@
*/
package org.intocps.orchestration.coe.cosim.varstep.constraint.zerocrossing;
-import java.util.Observable;
-import java.util.Observer;
-
import org.intocps.orchestration.coe.cosim.varstep.CurrentSolutionPoint;
import org.intocps.orchestration.coe.cosim.varstep.CurrentSolutionPoint.Operation;
import org.intocps.orchestration.coe.cosim.varstep.StepsizeInterval;
@@ -59,6 +56,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Observable;
+import java.util.Observer;
+
public class ZerocrossingHandler implements Observer, ConstraintHandler
{
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/derivatives/DerivativeEstimator.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/derivatives/DerivativeEstimator.java
index d0ca79d89..f5d9195db 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/derivatives/DerivativeEstimator.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/derivatives/DerivativeEstimator.java
@@ -42,13 +42,13 @@
*/
package org.intocps.orchestration.coe.cosim.varstep.derivatives;
-import java.util.HashMap;
-import java.util.Map;
-
import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance;
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.ScalarVariable;
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.Types;
+import java.util.HashMap;
+import java.util.Map;
+
public class DerivativeEstimator
{
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/valuetracker/DoubleValueTracker.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/valuetracker/DoubleValueTracker.java
index eb716b531..6aa70013e 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/valuetracker/DoubleValueTracker.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/valuetracker/DoubleValueTracker.java
@@ -42,15 +42,15 @@
*/
package org.intocps.orchestration.coe.cosim.varstep.valuetracker;
-import java.util.Observable;
-import java.util.Observer;
-
import org.intocps.orchestration.coe.config.ModelConnection.Variable;
import org.intocps.orchestration.coe.cosim.varstep.CurrentSolutionPoint;
import org.intocps.orchestration.coe.cosim.varstep.CurrentSolutionPoint.Operation;
import org.intocps.orchestration.coe.cosim.varstep.derivatives.ScalarDerivativeEstimator;
import org.intocps.orchestration.coe.cosim.varstep.extrapolationerror.ExtrapolationErrorEstimator;
+import java.util.Observable;
+import java.util.Observer;
+
public class DoubleValueTracker implements Observer, ValueTracker
{
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/valuetracker/OptionalDifferenceTracker.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/valuetracker/OptionalDifferenceTracker.java
index c3dcf92ae..942256571 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/valuetracker/OptionalDifferenceTracker.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/cosim/varstep/valuetracker/OptionalDifferenceTracker.java
@@ -42,11 +42,11 @@
*/
package org.intocps.orchestration.coe.cosim.varstep.valuetracker;
+import org.intocps.orchestration.coe.config.ModelConnection.Variable;
+
import java.util.List;
import java.util.Observable;
-import org.intocps.orchestration.coe.config.ModelConnection.Variable;
-
public class OptionalDifferenceTracker implements ValueTracker
{
private ValueTracker value1 = null;
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/GlobalStateMerger.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/GlobalStateMerger.scala
index cb8dcf18d..319cbcbab 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/GlobalStateMerger.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/GlobalStateMerger.scala
@@ -37,8 +37,8 @@ package org.intocps.orchestration.coe.hierarchical
import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.ScalarVariable
-import org.intocps.orchestration.coe.scala.{CoeObject, InstanceState}
import org.intocps.orchestration.coe.scala.CoeObject.GlobalState
+import org.intocps.orchestration.coe.scala.InstanceState
import scala.collection.JavaConversions._
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/HierarchicalCoeComponent.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/HierarchicalCoeComponent.java
index d05864a62..8d0076302 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/HierarchicalCoeComponent.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/HierarchicalCoeComponent.java
@@ -50,7 +50,6 @@
import org.intocps.orchestration.coe.modeldefinition.xml.NodeIterator;
import org.intocps.orchestration.coe.scala.Coe;
import org.intocps.orchestration.coe.scala.CoeObject;
-import org.intocps.orchestration.coe.scala.IStateChangeListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/HierarchicalExternalFmuStub.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/HierarchicalExternalFmuStub.java
index 0e799dc6b..416e28145 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/HierarchicalExternalFmuStub.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/HierarchicalExternalFmuStub.java
@@ -44,7 +44,6 @@
import java.io.InputStream;
import java.net.URI;
import java.nio.file.Paths;
-import java.util.zip.ZipException;
/**
* Created by kel on 05/10/2017.
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/HierarchicalExternalFmuStubComponent.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/HierarchicalExternalFmuStubComponent.java
index d31399523..79030ff5f 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/HierarchicalExternalFmuStubComponent.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/hierarchical/HierarchicalExternalFmuStubComponent.java
@@ -34,23 +34,10 @@
*/
package org.intocps.orchestration.coe.hierarchical;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import fi.iki.elonen.NanoHTTPD;
-import org.apache.commons.io.IOUtils;
import org.intocps.fmi.*;
-import org.intocps.orchestration.coe.FmuFactory;
-import org.intocps.orchestration.coe.IFmuFactory;
-import org.intocps.orchestration.coe.httpserver.RequestProcessors;
-import org.intocps.orchestration.coe.httpserver.SessionController;
-import org.intocps.orchestration.coe.json.ProdSessionLogicFactory;
-import org.intocps.orchestration.coe.scala.Coe;
-import org.intocps.orchestration.coe.scala.CoeObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.io.IOException;
-
/**
* Created by kel on 04/10/2017.
*/
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/RequestHandler.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/RequestHandler.java
index 1a039be36..f201d896c 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/RequestHandler.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/RequestHandler.java
@@ -34,19 +34,17 @@
*/
package org.intocps.orchestration.coe.httpserver;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
-
import fi.iki.elonen.NanoHTTPD;
import fi.iki.elonen.NanoWSD;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
/**
* Created by ctha on 29-03-2016.
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/RequestProcessors.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/RequestProcessors.java
index c06c75a5e..3e0ca052d 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/RequestProcessors.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/RequestProcessors.java
@@ -38,9 +38,6 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import fi.iki.elonen.NanoHTTPD;
import org.apache.commons.io.FileUtils;
-import org.apache.log4j.FileAppender;
-import org.apache.log4j.Level;
-import org.apache.log4j.LogManager;
import org.intocps.orchestration.coe.config.InvalidVariableStringException;
import org.intocps.orchestration.coe.config.ModelConnection;
import org.intocps.orchestration.coe.config.ModelParameter;
@@ -56,6 +53,7 @@
import org.intocps.orchestration.coe.scala.CoeStatus;
import org.intocps.orchestration.coe.scala.LogVariablesContainer;
import org.intocps.orchestration.coe.util.DeleteOnCloseFileInputStream;
+import org.intocps.orchestration.coe.util.Util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -192,7 +190,8 @@ public NanoHTTPD.Response processInitialize(String sessionId, String data) throw
}
if (st.overrideLogLevel != null) {
- LogManager.getRootLogger().setLevel(Level.toLevel(st.overrideLogLevel));
+ org.intocps.orchestration.coe.util.Util.setLogLevel(st.overrideLogLevel);
+
}
if (st.getFmuFiles() == null) {
@@ -421,36 +420,7 @@ public NanoHTTPD.Response processResult(String sessionId, boolean zip) throws IO
}
public NanoHTTPD.Response processDestroy(String sessionId) throws IOException {
- logger.debug("Destroying session {}.", sessionId);
- org.apache.log4j.Logger rootLogger = org.apache.log4j.Logger.getRootLogger();
- ArrayList appendersToRemove = new ArrayList<>();
- Enumeration appenders = rootLogger.getAllAppenders();
-
- if (appenders != null) {
- while (appenders.hasMoreElements()) {
- try {
- Object element = appenders.nextElement();
- if (element != null && element instanceof FileAppender) {
- FileAppender fileAppender = (FileAppender) element;
- logger.debug("Checking if appender to file {} belongs to session {}", fileAppender.getFile(), sessionId);
- if (fileAppender.getFile() != null && fileAppender.getFile()
- .matches("(.*)(" + sessionId + ")[/\\\\](.*)[/\\\\].*(\\.log)$")) {
- // Log files for fmu instances.
- // Regex matches +sessionId++++anything.log
- logger.debug("Closing appender to file {}", fileAppender.getFile());
- fileAppender.close();
- appendersToRemove.add(fileAppender);
- }
- }
- } catch (NoSuchElementException e) {
- //this is not synchronized so this can happen
- }
- }
- appendersToRemove.forEach(fa -> {
- rootLogger.removeAppender(fa);
- });
-
- }
+ Util.removeCoSimInstanceLogAppenders(sessionId);
File resultFile = this.sessionController.getSessionRootDir(sessionId);
logger.debug("Deleting directory {}.", resultFile.getPath());
FileUtils.deleteDirectory(resultFile);
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/Response.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/Response.java
index 35eccffc0..beedc53da 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/Response.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/Response.java
@@ -34,7 +34,8 @@
*/
package org.intocps.orchestration.coe.httpserver;
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
import java.util.Properties;
/**
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/SessionController.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/SessionController.java
index 466cc725d..e5b773b98 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/SessionController.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/httpserver/SessionController.java
@@ -34,7 +34,6 @@
*/
package org.intocps.orchestration.coe.httpserver;
-import org.intocps.orchestration.coe.httpserver.SessionLogic;
import org.intocps.orchestration.coe.json.SessionLogicFactory;
import org.intocps.orchestration.coe.json.StatusMsgJson;
import org.intocps.orchestration.coe.scala.Coe;
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/initializing/GraphBuilder.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/initializing/GraphBuilder.java
index 15895e038..a7510423a 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/initializing/GraphBuilder.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/initializing/GraphBuilder.java
@@ -35,7 +35,6 @@
package org.intocps.orchestration.coe.initializing;
import org.intocps.orchestration.coe.AbortSimulationException;
-import org.intocps.orchestration.coe.BasicInitializer;
import org.intocps.orchestration.coe.config.ModelConnection;
import org.intocps.orchestration.coe.cosim.base.FmiSimulationInstance;
import org.intocps.orchestration.coe.cosim.base.Tuple2;
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/initializing/Port.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/initializing/Port.java
index b3beca4fd..a0c5b2963 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/initializing/Port.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/initializing/Port.java
@@ -35,7 +35,6 @@
package org.intocps.orchestration.coe.initializing;
import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.intocps.orchestration.coe.BasicInitializer;
import org.intocps.orchestration.coe.config.ModelConnection;
import org.intocps.orchestration.coe.cosim.base.FmiSimulationInstance;
import org.intocps.orchestration.coe.modeldefinition.ModelDescription;
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/json/InitializationMsgJson.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/json/InitializationMsgJson.java
index 50b8c0b77..52f7c4c64 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/json/InitializationMsgJson.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/json/InitializationMsgJson.java
@@ -41,11 +41,9 @@
import org.intocps.orchestration.coe.config.ModelConnection.Variable;
import org.intocps.orchestration.coe.cosim.varstep.constraint.ConstraintType;
import org.intocps.orchestration.coe.cosim.varstep.constraint.samplingrate.Sampling;
-import org.intocps.orchestration.coe.cosim.varstep.valuetracker.DoubleValueTracker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.io.File;
import java.lang.reflect.Field;
import java.net.URI;
import java.util.HashMap;
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/json/InitializationStatusJson.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/json/InitializationStatusJson.java
index 87411a5b6..7eae9d22a 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/json/InitializationStatusJson.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/json/InitializationStatusJson.java
@@ -34,11 +34,11 @@
*/
package org.intocps.orchestration.coe.json;
+import org.intocps.orchestration.coe.modeldefinition.ModelDescription.LogCategory;
+
import java.util.List;
import java.util.Map;
-import org.intocps.orchestration.coe.modeldefinition.ModelDescription.LogCategory;
-
public class InitializationStatusJson extends StatusMsgJson
{
public Map> avaliableLogLevels;
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/Coe.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/Coe.scala
index 0da1f9c5d..5c3b32d78 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/Coe.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/Coe.scala
@@ -34,11 +34,6 @@
*/
package org.intocps.orchestration.coe.scala
-import java.io.File
-import java.net.URI
-import java.util
-import java.util.List
-
import org.apache.commons.io.{FileUtils, FilenameUtils}
import org.apache.commons.lang3.time.DurationFormatUtils
import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance
@@ -53,6 +48,10 @@ import org.intocps.orchestration.coe.scala.CoeObject.{FmiSimulationInstanceScala
import org.intocps.orchestration.coe.{AbortSimulationException, BasicInitializer}
import org.slf4j.LoggerFactory
+import java.io.File
+import java.net.URI
+import java.util
+import java.util.List
import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
import scala.collection.mutable.{LinkedList, ListBuffer}
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeInitialize.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeInitialize.scala
index e4c958298..d6fa51caa 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeInitialize.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeInitialize.scala
@@ -34,19 +34,19 @@
*/
package org.intocps.orchestration.coe.scala
-import java.io.{File, FileNotFoundException, IOException}
-import java.net.URI
-
import org.intocps.fmi.{Fmi2Status, IFmu, IFmuCallback}
-import org.intocps.orchestration.coe.{AbortSimulationException, FmuFactory}
import org.intocps.orchestration.coe.config.ModelConnection
import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance
import org.intocps.orchestration.coe.modeldefinition.ModelDescription
import org.intocps.orchestration.coe.modeldefinition.ModelDescription._
+import org.intocps.orchestration.coe.util.Util
+import org.intocps.orchestration.coe.{AbortSimulationException, FmuFactory}
import org.intocps.orchestration.fmi.VdmSvChecker
import org.intocps.orchestration.fmi.VdmSvChecker.ScalarVariableConfigException
import org.xml.sax.SAXParseException
+import java.io.{File, FileNotFoundException, IOException}
+import java.net.URI
import scala.collection.JavaConversions.{asJavaCollection, asScalaBuffer, bufferAsJavaList}
import scala.collection.immutable.{HashMap, Map}
import scala.util.{Failure, Try}
@@ -385,7 +385,7 @@ object CoeInitialize
}
val instanceName = mi.instanceName
logger.debug(String.format("Loading native FMU. GUID: %s, NAME: %s", "" + fm._2._1.getGuid, "" + mi.instanceName))
- val compLogger = getCoSimInstanceLogger(fmuFolder, instanceName)
+ val compLogger = Util.getCoSimInstanceLogger(fmuFolder, instanceName)
val md: ModelDescription = fm._2._1
logger.info("Instantiating FMU. ModelName: '{}', GUID: '{}', Vendor tool: '{}', Generated by: '{}', at: {} Execution tool required: {}", Array(md.getModelId, md.getGuid, md.getVendorToolName, md.getGenerationTool, md.getGenerationDateAndTime, md.getNeedsExecutionTool).asInstanceOf[Array[Object]]: _*)
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeObject.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeObject.scala
index f3274a652..7427cdc8f 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeObject.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeObject.scala
@@ -34,48 +34,17 @@
*/
package org.intocps.orchestration.coe.scala
-import java.io.File
-import java.io.FileNotFoundException
-import java.io.IOException
-import scala.collection.JavaConversions.asJavaCollection
-import scala.collection.JavaConversions.asScalaBuffer
-import scala.collection.JavaConversions.bufferAsJavaList
-import scala.collection.JavaConversions.seqAsJavaList
-import scala.collection.JavaConverters.mapAsScalaMapConverter
-import scala.collection.immutable.Map
-import scala.util.Failure
-import scala.util.Success
-import scala.util.Try
-import org.apache.log4j.FileAppender
-import org.apache.log4j.Logger
-import org.apache.log4j.PatternLayout
-import org.apache.log4j.spi.Filter
-import org.apache.log4j.spi.LoggingEvent
-import org.intocps.fmi.Fmi2Status
-import org.intocps.fmi.Fmi2StatusKind
-import org.intocps.fmi.IFmiComponent
-import org.intocps.fmi.IFmu
-import org.intocps.fmi.IFmuCallback
+import org.intocps.fmi.{Fmi2Status, IFmiComponent}
import org.intocps.orchestration.coe.AbortSimulationException
-import org.intocps.orchestration.coe.FmuFactory
import org.intocps.orchestration.coe.config.ModelConnection
import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance
-import org.intocps.orchestration.coe.cosim.base.FmiInstanceConfig
-import org.intocps.orchestration.coe.cosim.base.FmiSimulationInstance
+import org.intocps.orchestration.coe.cosim.base.{FmiInstanceConfig, FmiSimulationInstance}
import org.intocps.orchestration.coe.modeldefinition.ModelDescription
-import org.intocps.orchestration.coe.modeldefinition.ModelDescription.Causality
-import org.intocps.orchestration.coe.modeldefinition.ModelDescription.LogCategory
-import org.intocps.orchestration.coe.modeldefinition.ModelDescription.ModelDescriptionParseException
-import org.intocps.orchestration.coe.modeldefinition.ModelDescription.ScalarVariable
-import org.intocps.orchestration.coe.modeldefinition.ModelDescription.Types
-import org.intocps.orchestration.coe.util.Util
-import org.intocps.orchestration.fmi.VdmSvChecker
-import org.intocps.orchestration.fmi.VdmSvChecker.ScalarVariableConfigException
+import org.intocps.orchestration.coe.modeldefinition.ModelDescription.{ScalarVariable, Types}
import org.slf4j.LoggerFactory
-import org.xml.sax.SAXParseException
-import java.io.OutputStream
-import scala.util.Success
-import scala.util.Success
+
+import scala.collection.JavaConversions.seqAsJavaList
+import scala.util.{Failure, Success, Try}
object CoeObject
{
@@ -152,28 +121,5 @@ object CoeObject
}
}
- def getCoSimInstanceLogger(root: File,logName:String): org.slf4j.Logger =
- {
- //Define log pattern layout
- val layout = new PatternLayout("%d{ISO8601} %-5p - %m%n")
- val logger = LoggerFactory.getLogger("fmi.instance."+logName)
- //Define file appender with layout and output log file name
- val fileAppender = new FileAppender(layout, new File(root, logName+".log").getAbsolutePath, false)
- val f = new Filter()
- {
- def decide(event: LoggingEvent): Int =
- {
- if (event.getLoggerName.equals(logger.getName))
- {
- return Filter.ACCEPT
- }
- return Filter.DENY
- }
- }
- fileAppender.addFilter(f)
- Logger.getRootLogger().addAppender(fileAppender)
-
- return logger
- }
}
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeScalaUtil.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeScalaUtil.scala
index ada7243d0..4035c37ad 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeScalaUtil.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeScalaUtil.scala
@@ -36,6 +36,7 @@ package org.intocps.orchestration.coe.scala
import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.ScalarVariable
+
import java.util.HashMap
object CoeScalaUtil {
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeSimulator.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeSimulator.scala
index c3d31460b..1b8075b95 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeSimulator.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeSimulator.scala
@@ -34,9 +34,6 @@
*/
package org.intocps.orchestration.coe.scala
-import java.io.File
-import java.util
-
import org.apache.commons.lang3.StringUtils
import org.intocps.fmi._
import org.intocps.orchestration.coe.AbortSimulationException
@@ -48,6 +45,8 @@ import org.intocps.orchestration.coe.modeldefinition.ModelDescription
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.{ScalarVariable, Types}
import org.intocps.orchestration.coe.util.{Numpy, Util}
+import java.io.File
+import java.util
import scala.collection.JavaConversions
import scala.collection.JavaConversions.{asJavaCollection, _}
import scala.collection.JavaConverters._
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeTrait.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeTrait.java
index b82da57e3..940021350 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeTrait.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/CoeTrait.java
@@ -37,11 +37,7 @@
import org.intocps.orchestration.coe.config.ModelConnection;
import org.intocps.orchestration.coe.config.ModelParameter;
import org.intocps.orchestration.coe.cosim.CoSimStepSizeCalculator;
-import org.intocps.orchestration.coe.modeldefinition.ModelDescription;
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.LogCategory;
-import scala.Double;
-import scala.Long;
-import scala.collection.immutable.List;
import java.util.Map;
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/InstanceState.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/InstanceState.scala
index 8d7c382b3..b662d77ea 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/InstanceState.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/InstanceState.scala
@@ -35,11 +35,8 @@
package org.intocps.orchestration.coe.scala
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.ScalarVariable
-import org.intocps.fmi.IFmiComponentState
import scala.collection.JavaConversions._
-import scala.collection.JavaConverters.mapAsJavaMapConverter
-import scala.collection.JavaConverters.mapAsScalaMapConverter
class InstanceState(val time: Double,
val state: Map[ScalarVariable, Object],
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/LiveStreamLogger.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/LiveStreamLogger.scala
index 30511f43d..13b8b06b5 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/LiveStreamLogger.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/LiveStreamLogger.scala
@@ -34,11 +34,11 @@
*/
package org.intocps.orchestration.coe.scala
+import argonaut.Argonaut._
+import argonaut._
import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.ScalarVariable
import org.intocps.orchestration.coe.scala.CoeObject.GlobalState
-import argonaut.Argonaut._
-import argonaut._
/**
* Created by kel on 18/07/16.
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/LiveStreamProgressLogger.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/LiveStreamProgressLogger.scala
index 7dace42ab..fa15a93d9 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/LiveStreamProgressLogger.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/LiveStreamProgressLogger.scala
@@ -34,12 +34,6 @@
*/
package org.intocps.orchestration.coe.scala
-import argonaut.Argonaut._
-import argonaut._
-import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance
-import org.intocps.orchestration.coe.modeldefinition.ModelDescription.ScalarVariable
-import org.intocps.orchestration.coe.scala.CoeObject.GlobalState
-
/**
* Created by kel on 18/07/16.
*/
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/ResultLogger.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/ResultLogger.scala
index 84c4633a9..ae630121e 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/ResultLogger.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/ResultLogger.scala
@@ -34,21 +34,14 @@
*/
package org.intocps.orchestration.coe.scala
-import java.io.{BufferedOutputStream, File, FileOutputStream, OutputStream}
-
+import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.ScalarVariable
import org.intocps.orchestration.coe.scala.CoeObject.GlobalState
import org.slf4j.LoggerFactory
-import org.apache.commons.io.FileUtils
-import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance
-import java.io.BufferedOutputStream
-import java.io.FileOutputStream
-import java.io.OutputStream
+import java.io.{BufferedOutputStream, File, FileOutputStream, OutputStream}
import scala.collection.immutable.SortedMap
-import java.io.File
-
/**
* Created by kel on 18/07/16.
*/
@@ -91,8 +84,7 @@ class ResultLogger(file: File, enabledVariables: Map[ModelInstance, Set[ScalarVa
}
override def stop(): Unit =
- {
- logger.debug("Closing file {}.", file)
+ { if (resultOutputStream != null)
resultOutputStream.close()
}
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/ResultStorage.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/ResultStorage.scala
index aca82ec93..c118f11c6 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/ResultStorage.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/ResultStorage.scala
@@ -34,15 +34,6 @@
*/
package org.intocps.orchestration.coe.scala
-import org.apache.commons.io.FileUtils
-import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance
-import java.io.BufferedOutputStream
-import java.io.FileOutputStream
-import java.io.OutputStream
-import scala.collection.immutable.SortedMap
-
-import java.io.File
-
object ResultStorage
{
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/VariableResolver.scala b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/VariableResolver.scala
index 50cec58a6..1c7859867 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/VariableResolver.scala
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/scala/VariableResolver.scala
@@ -35,10 +35,9 @@
package org.intocps.orchestration.coe.scala
import org.intocps.fmi.IFmu
+import org.intocps.orchestration.coe.config.ModelConnection.{ModelInstance, Variable}
import org.intocps.orchestration.coe.modeldefinition.ModelDescription
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.ScalarVariable
-import org.intocps.orchestration.coe.config.ModelConnection.ModelInstance
-import org.intocps.orchestration.coe.config.ModelConnection.Variable
class VariableResolver( fmuMap: Map[String, (IFmu, (ModelDescription, List[ScalarVariable]))]) {
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/single/SingleSimMain.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/single/SingleSimMain.java
index 5e22c4106..8bc5e77d0 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/single/SingleSimMain.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/single/SingleSimMain.java
@@ -42,8 +42,6 @@
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
import org.intocps.fmi.IFmu;
import org.intocps.orchestration.coe.FmuFactory;
import org.intocps.orchestration.coe.json.InitializationMsgJson;
@@ -203,14 +201,14 @@ public static void main(String[] args) throws Exception {
System.setProperty("coe.csv.quote.header", "true");
System.setProperty("coe.csv.boolean.numeric", "true");
- if (cmd.hasOption(logLevelOpt.getOpt())) {
- Logger l = Logger.getRootLogger();
- l.setLevel(Level.toLevel(cmd.getOptionValue(logLevelOpt.getOpt())));
- }
+ if (cmd.hasOption(logLevelOpt.getOpt())) {
+ org.intocps.orchestration.coe.util.Util.setLogLevel(cmd.getOptionValue(logLevelOpt.getOpt()));
+ }
+
+ URI fmuUri = new File(fmuPath).toURI();
+ if (fmuUri.getScheme() == null || fmuUri.getScheme().equals("file")){
- URI fmuUri = new File(fmuPath).toURI();
- if (fmuUri.getScheme() == null || fmuUri.getScheme().equals("file")) {
- if (!fmuUri.isAbsolute()) {
+ if (!fmuUri.isAbsolute()) {
System.out.println("resolving: " + fmuUri);
fmuUri = new File(".").toURI().resolve(fmuUri);
}
diff --git a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/util/Util.java b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/util/Util.java
index c78ce70b8..3287ebb92 100644
--- a/orchestration/coe/src/main/java/org/intocps/orchestration/coe/util/Util.java
+++ b/orchestration/coe/src/main/java/org/intocps/orchestration/coe/util/Util.java
@@ -1,241 +1,347 @@
/*
-* This file is part of the INTO-CPS toolchain.
-*
-* Copyright (c) 2017-CurrentYear, INTO-CPS Association,
-* c/o Professor Peter Gorm Larsen, Department of Engineering
-* Finlandsgade 22, 8200 Aarhus N.
-*
-* All rights reserved.
-*
-* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR
-* THIS INTO-CPS ASSOCIATION PUBLIC LICENSE VERSION 1.0.
-* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES
-* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL
-* VERSION 3, ACCORDING TO RECIPIENTS CHOICE.
-*
-* The INTO-CPS toolchain and the INTO-CPS Association Public License
-* are obtained from the INTO-CPS Association, either from the above address,
-* from the URLs: http://www.into-cps.org, and in the INTO-CPS toolchain distribution.
-* GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
-*
-* This program is distributed WITHOUT ANY WARRANTY; without
-* even the implied warranty of MERCHANTABILITY or FITNESS FOR
-* A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH IN THE
-* BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF
-* THE INTO-CPS ASSOCIATION.
-*
-* See the full INTO-CPS Association Public License conditions for more details.
-*/
+ * This file is part of the INTO-CPS toolchain.
+ *
+ * Copyright (c) 2017-CurrentYear, INTO-CPS Association,
+ * c/o Professor Peter Gorm Larsen, Department of Engineering
+ * Finlandsgade 22, 8200 Aarhus N.
+ *
+ * All rights reserved.
+ *
+ * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR
+ * THIS INTO-CPS ASSOCIATION PUBLIC LICENSE VERSION 1.0.
+ * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES
+ * RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL
+ * VERSION 3, ACCORDING TO RECIPIENTS CHOICE.
+ *
+ * The INTO-CPS toolchain and the INTO-CPS Association Public License
+ * are obtained from the INTO-CPS Association, either from the above address,
+ * from the URLs: http://www.into-cps.org, and in the INTO-CPS toolchain distribution.
+ * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
+ *
+ * This program is distributed WITHOUT ANY WARRANTY; without
+ * even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ * A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH IN THE
+ * BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF
+ * THE INTO-CPS ASSOCIATION.
+ *
+ * See the full INTO-CPS Association Public License conditions for more details.
+ */
/*
-* Author:
-* Kenneth Lausdahl
-* Casper Thule
-*/
+ * Author:
+ * Kenneth Lausdahl
+ * Casper Thule
+ */
package org.intocps.orchestration.coe.util;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FilenameFilter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
import org.apache.commons.lang3.ArrayUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.intocps.fmi.Fmi2Status;
-import org.intocps.fmi.FmiInvalidNativeStateException;
-import org.intocps.fmi.FmuInvocationException;
-import org.intocps.fmi.FmuResult;
-import org.intocps.fmi.IFmiComponent;
-import org.intocps.fmi.InvalidParameterException;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.Appender;
+import org.apache.logging.log4j.core.Filter;
+import org.apache.logging.log4j.core.LogEvent;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.appender.OutputStreamAppender;
+import org.apache.logging.log4j.core.config.Configuration;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.config.LoggerConfig;
+import org.apache.logging.log4j.core.filter.AbstractFilter;
+import org.apache.logging.log4j.core.layout.PatternLayout;
+import org.intocps.fmi.*;
import org.intocps.orchestration.coe.config.ModelConnection;
import org.intocps.orchestration.coe.modeldefinition.ModelDescription;
import org.intocps.orchestration.coe.modeldefinition.ModelDescription.ScalarVariable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class Util
-{
- final static Logger logger = LoggerFactory.getLogger(Util.class);
-
- public static FilenameFilter fmuFileFilter = new FilenameFilter()
- {
-
- @Override public boolean accept(File dir, String name)
- {
- return name.endsWith(".fmu");
- }
- };
-
- public static List parseConnections() throws Exception
- {
- List connections = new Vector();
-
- BufferedReader br = new BufferedReader(new FileReader(new File("src/test/resources/links.property".replace('/', File.separatorChar))));
- String line;
- while ((line = br.readLine()) != null)
- {
- if (line.trim().startsWith("//"))
- continue;
- connections.add(ModelConnection.parse(line));
- }
- br.close();
-
- return connections;
- }
-
- /**
- * Method to set variables in an fmu instance
- *
- * @param comp
- * @param type
- * @param indices
- * @param values
- * @throws InvalidParameterException
- * @throws FmiInvalidNativeStateException
- */
- public static void setRaw(IFmiComponent comp, ModelDescription.Types type,
- Map indexToValue)
- throws InvalidParameterException, FmiInvalidNativeStateException
- {
- long[] a = new long[indexToValue.size()];
- ArrayList