INTO-CPS-Association / maestro

Maestro a Co-Simulation Orchestration Engine
https://build.overture.au.dk/jenkins/job/maestro/
19 stars 3 forks source link

Value "1" for Boolean Scalar Variable being parsed as false #411

Closed clagms closed 5 months ago

clagms commented 1 year ago

According to the FMI standard, boolean scalar variables can have the possible values "0", "1", "false", and "true".

However, the following scalar variable "config.ssl" gets parsed as false, despite having "1" for start value. The scalar variable is declared as:

        <ScalarVariable name="config.ssl" valueReference="16" variability="fixed" causality="parameter" initial="exact">
            <Boolean start="1"/>
        </ScalarVariable>

The workaround is to declare the start value as "true":

        <ScalarVariable name="config.ssl" valueReference="16" variability="fixed" causality="parameter" initial="exact">
            <Boolean start="true"/>
        </ScalarVariable>

In Maestrov1 this issue does not occur.

It is very difficult to catch this error, because there is no error message. It simply continues with the wrong value and subsequently fails to connect to rabbitmq server. @gitting-around is aware of this issue.

I suspect the offending code is here