open-simulation-platform / libcosim

OSP C++ co-simulation library
https://open-simulation-platform.github.io/libcosim
Mozilla Public License 2.0
61 stars 10 forks source link

OpsSystemStructure.xsd does not allow empty list of InitialValues #612

Closed hplatou closed 4 years ago

hplatou commented 4 years ago

The following OspSystemStructure.xml will fail validation when loading config:

<?xml version="1.0" encoding="UTF-8"?>
<OspSystemStructure xmlns="http://opensimulationplatform.com/MSMI/OSPSystemStructure" version="0.1">
    <StartTime>0.0</StartTime>
    <BaseStepSize>0.01</BaseStepSize>
    <Algorithm>fixedStep</Algorithm>
    <Simulators>
        <Simulator name="chassis1" source="chassis.fmu">
            <InitialValues/>
        </Simulator>
        <Simulator name="ground1" source="ground.fmu"/>
    </Simulators>
    <Connections/>
</OspSystemStructure>

The existing .xsd requires minimum of one <InitialValue> within <InitialValues>. I think it should be allowed with an empty sequence like <InitialValues/>