diff --git a/fmi-import/src/main/kotlin/no/ntnu/ihb/fmi4j/importer/fmi1/AbstractModelInstance.kt b/fmi-import/src/main/kotlin/no/ntnu/ihb/fmi4j/importer/fmi1/AbstractModelInstance.kt index 49a87d96..77e07e5d 100644 --- a/fmi-import/src/main/kotlin/no/ntnu/ihb/fmi4j/importer/fmi1/AbstractModelInstance.kt +++ b/fmi-import/src/main/kotlin/no/ntnu/ihb/fmi4j/importer/fmi1/AbstractModelInstance.kt @@ -76,12 +76,6 @@ abstract class AbstractModelInstance 0 - return (wrapper.initialize(toleranceControlled, tolerance).isOK()).also { - simulationTime = start - } + relativeTolerance = tolerance + + return true } + override fun exitInitializationMode(): Boolean { + val toleranceControlled = relativeTolerance > 0 + return (wrapper.initialize(toleranceControlled, relativeTolerance).isOK()).also { + wrapper.lastStatus = FmiStatus.OK + } + } + override fun reset(): Boolean { throw IllegalStateException("Reset not supported by FMI 1.0 for Model Exchange") }