-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from open-simulation-platform/release/0.12.0
Release/0.12.0
- Loading branch information
Showing
15 changed files
with
120 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
22 changes: 22 additions & 0 deletions
22
osp-validator-cli/src/main/resources/example/CraneController_OspModelDescription.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<OspModelDescription xmlns="https://open-simulation-platform.com/OspModelDescription/1.0.0" version="1.0"> | ||
<VariableGroups> | ||
<Generic name="actuator_limits"> | ||
<Variable ref="Act_Limits[1]"/> | ||
<Variable ref="Act_Limits[2]"/> | ||
<Variable ref="Act_Limits[3]"/> | ||
</Generic> | ||
<LinearMechanicalPort name="linear_mechanical_port"> | ||
<Force name="force"> | ||
<Variable ref="p_Crane.e[1]"/> | ||
<Variable ref="p_Crane.e[2]"/> | ||
<Variable ref="p_Crane.e[3]"/> | ||
</Force> | ||
<LinearVelocity name="linear_velocity"> | ||
<Variable ref="p_Crane.f[1]"/> | ||
<Variable ref="p_Crane.f[2]"/> | ||
<Variable ref="p_Crane.f[3]"/> | ||
</LinearVelocity> | ||
</LinearMechanicalPort> | ||
</VariableGroups> | ||
</OspModelDescription> |
Binary file not shown.
30 changes: 30 additions & 0 deletions
30
osp-validator-cli/src/main/resources/example/KnuckleBoomCrane_OspModelDescription.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<OspModelDescription xmlns="https://open-simulation-platform.com/OspModelDescription/1.0.0" version="1.0"> | ||
<UnitDefinitions> | ||
<Unit name="a"> | ||
<BaseUnit kg="1"/> | ||
</Unit> | ||
<Unit name="b"> | ||
<BaseUnit kg="2"/> | ||
</Unit> | ||
</UnitDefinitions> | ||
<VariableGroups> | ||
<Generic name="actuator_limits"> | ||
<Variable ref="Act_Limits[1]"/> | ||
<Variable ref="Act_Limits[2]"/> | ||
<Variable ref="Act_Limits[3]"/> | ||
</Generic> | ||
<LinearMechanicalPort name="linear_mechanical_port"> | ||
<Force name="force"> | ||
<Variable ref="p_Crane.e[1]"/> | ||
<Variable ref="p_Crane.e[2]"/> | ||
<Variable ref="p_Crane.e[3]"/> | ||
</Force> | ||
<LinearVelocity name="linear_velocity"> | ||
<Variable ref="p_Crane.f[1]"/> | ||
<Variable ref="p_Crane.f[2]"/> | ||
<Variable ref="p_Crane.f[3]"/> | ||
</LinearVelocity> | ||
</LinearMechanicalPort> | ||
</VariableGroups> | ||
</OspModelDescription> |
16 changes: 16 additions & 0 deletions
16
osp-validator-cli/src/main/resources/example/OspSystemStructure_Crane.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<OspSystemStructure version="0.1" xmlns="http://opensimulationplatform.com/MSMI/OSPSystemStructure"> | ||
<Simulators> | ||
<Simulator name="crane_controller" source="CraneController.fmu" stepSize="1.051732E7"/> | ||
<Simulator name="knuckle_boom_crane" source="KnuckleBoomCrane.fmu" stepSize="1.051732E7"/> | ||
</Simulators> | ||
<Connections> | ||
<VariableConnection> | ||
<Variable simulator="crane_controller" name="Act_Limits[1]"/> | ||
<Variable simulator="knuckle_boom_crane" name="Act_Limits[1]"/> | ||
</VariableConnection> | ||
<VariableGroupConnection> | ||
<VariableGroup simulator="crane_controller" name="linear_mechanical_port"/> | ||
<VariableGroup simulator="knuckle_boom_crane" name="linear_mechanical_port"/> | ||
</VariableGroupConnection> | ||
</Connections> | ||
</OspSystemStructure> |
33 changes: 33 additions & 0 deletions
33
osp-validator-cli/src/test/java/com/opensimulationplatform/cli/ExampleTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.opensimulationplatform.cli; | ||
|
||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.junit.contrib.java.lang.system.ExpectedSystemExit; | ||
|
||
public class ExampleTest { | ||
|
||
@Rule | ||
public final ExpectedSystemExit exit = ExpectedSystemExit.none(); | ||
|
||
@Test | ||
public void canValidateOspSystemStructure() { | ||
exit.expectSystemExitWithStatus(0); | ||
Main.main(new String[]{"osp-system-structure", "-file", "./src/main/resources/example/OspSystemStructure_Crane.xml"}); | ||
} | ||
|
||
@Test | ||
public void canValidateKnuckleBoomCraneOspModelDescription() { | ||
exit.expectSystemExitWithStatus(0); | ||
Main.main(new String[]{"osp-model-description", | ||
"-file", "./src/main/resources/example/KnuckleBoomCrane_OspModelDescription.xml", | ||
"-fmu", "./src/main/resources/example/KnuckleBoomCrane.fmu"}); | ||
} | ||
|
||
@Test | ||
public void canValidateCraneControllerOspModelDescription() { | ||
exit.expectSystemExitWithStatus(0); | ||
Main.main(new String[]{"osp-model-description", | ||
"-file", "./src/main/resources/example/CraneController_OspModelDescription.xml", | ||
"-fmu", "./src/main/resources/example/CraneController.fmu"}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters