TEST of MagicDraw SysML export to Modelica vs Wolfram SystemModeler

Icon class
icon_class_computed
fas fa-book
The MagicDraw SysML Plugin and Magic Cyber-Systems Engineer ® (Cameo Systems Modeler®) have some ability to export to the Modelica modelling and simulation language. It targets currently primarily OpenModelica. This page offers some comparisons with the commercial Wolfram SystemModeler.

Of the four samples provided for MD SysML19SP3 only two both validate in Wolfram SystemModeler and run in Wolfram SystemModeler Simulation Centre:

  • Circuit: validates with warnings and runs.
  • ConnectedTanks: validates with warnings and runs.
  • HumidifierSystem: validates but does not run.
  • TestBed (for SignalProcessor): does not validate and does not run.
Validation for Circuit:

[11] 21:51 Validation of model Circuit 
Warning: Parameter _Circuit.s.amp has no value, and is fixed during initialization (fixed = true), using available start value (start = 220.0) as default value.
Warning: Parameter _Circuit.c.c has no value, and is fixed during initialization (fixed = true), using available start value (start = 0.01) as default value.
Warning: Parameter _Circuit.ri.r has no value, and is fixed during initialization (fixed = true), using available start value (start = 20.0) as default value.
Warning: Parameter _Circuit.i.l has no value, and is fixed during initialization (fixed = true), using available start value (start = 0.1) as default value.
Warning: Parameter _Circuit.rc.r has no value, and is fixed during initialization (fixed = true), using available start value (start = 10.0) as default value.
Notification: The initialization problem is underdetermined, the following variables were chosen to be initialized from their start values: _Circuit.i.iThru, _Circuit.c.vDrop
Validation of model Circuit completed successfully.
The model is globally balanced with 9 variables and 9 equations.
Among these, 9 equations are trivial.
Validation for ConnectedTanks:

[12] 21:57 Validation of model ConnectedTanks 
Warning: Parameter _ConnectedTanks.pipe.pipeLength has no value, and is fixed during initialization (fixed = true), using available start value (start = 10.0) as default value.
Warning: Parameter _ConnectedTanks.pipe.radius has no value, and is fixed during initialization (fixed = true), using available start value (start = 0.5) as default value.
Warning: Parameter _ConnectedTanks.pipe.dynamicViscosity has no value, and is fixed during initialization (fixed = true), using available start value (start = 2.0) as default value.
Warning: Parameter _ConnectedTanks.fluidReservoir1.tankSurfaceArea has no value, and is fixed during initialization (fixed = true), using available start value (start = 4.0) as default value.
Warning: Parameter _ConnectedTanks.fluidReservoir1.gravity has no value, and is fixed during initialization (fixed = true), using available start value (start = 9.800000000000001) as default value.
Warning: Parameter _ConnectedTanks.fluidReservoir1.fluidDensity has no value, and is fixed during initialization (fixed = true), using available start value (start = 10.0) as default value.
Warning: Parameter _ConnectedTanks.fluidReservoir2.tankSurfaceArea has no value, and is fixed during initialization (fixed = true), using available start value (start = 4.0) as default value.
Warning: Parameter _ConnectedTanks.fluidReservoir2.gravity has no value, and is fixed during initialization (fixed = true), using available start value (start = 9.800000000000001) as default value.
Warning: Parameter _ConnectedTanks.fluidReservoir2.fluidDensity has no value, and is fixed during initialization (fixed = true), using available start value (start = 10.0) as default value.
Validation of model ConnectedTanks completed successfully.
The model is globally balanced with 7 variables and 7 equations.
Among these, 7 equations are trivial.
Validation for HumidifierSystem:

[13] 21:57 Validation of model HumidifierSystem 
Warning: [1325:7-1325:57]No corresponding 'inner' declaration found for component .Modelica.StateGraph.Interfaces.CompositeStepState _HumidifierSystem.humidifier.heaterControl._HeaterControlSM.HeaterControlSM_region1_pseudostate4.stateGraphRoot declared as 'outer '.
  The existing 'inner' components are:
  There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: Modelica.StateGraph.InitialStep$_HumidifierSystem$humidifier$heaterControl$_HeaterControlSM$HeaterControlSM_region1_pseudostate4.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.
Warning: [1325:7-1325:57]No corresponding 'inner' declaration found for component .Modelica.StateGraph.Interfaces.CompositeStepState _HumidifierSystem.humidifier.heaterControl._HeaterControlSM.Off.stateGraphRoot declared as 'outer '.
  The existing 'inner' components are:
  There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: Modelica.StateGraph.Step$_HumidifierSystem$humidifier$heaterControl$_HeaterControlSM$Off.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.
Warning: [1325:7-1325:57]No corresponding 'inner' declaration found for component .Modelica.StateGraph.Interfaces.CompositeStepState _HumidifierSystem.humidifier.heaterControl._HeaterControlSM.On.stateGraphRoot declared as 'outer '.
  The existing 'inner' components are:
  There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: Modelica.StateGraph.Step$_HumidifierSystem$humidifier$heaterControl$_HeaterControlSM$On.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.
Warning: [112:74-112:97]In component _HumidifierSystem.humidifier.heaterControl._HeaterControlSM, in relation modeIn == /*Real*/(0),  ==  on Real numbers is only allowed inside functions.
Warning: [111:74-111:143]In component _HumidifierSystem.humidifier.heaterControl._HeaterControlSM, in relation modeIn == /*Real*/(1),  ==  on Real numbers is only allowed inside functions.
Warning: [1325:7-1325:57]No corresponding 'inner' declaration found for component .Modelica.StateGraph.Interfaces.CompositeStepState _HumidifierSystem.humidifier.usage._UsageScenarioStateMachine.UsageScenarioStateMachine_region1_pseudostate3.stateGraphRoot declared as 'outer '.
  The existing 'inner' components are:
  There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: Modelica.StateGraph.InitialStep$_HumidifierSystem$humidifier$usage$_UsageScenarioStateMachine$UsageScenarioStateMachine_region1_pseudostate3.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.
Warning: [1325:7-1325:57]No corresponding 'inner' declaration found for component .Modelica.StateGraph.Interfaces.CompositeStepState _HumidifierSystem.humidifier.usage._UsageScenarioStateMachine.On.stateGraphRoot declared as 'outer '.
  The existing 'inner' components are:
  There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: Modelica.StateGraph.Step$_HumidifierSystem$humidifier$usage$_UsageScenarioStateMachine$On.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.
Warning: [1325:7-1325:57]No corresponding 'inner' declaration found for component .Modelica.StateGraph.Interfaces.CompositeStepState _HumidifierSystem.humidifier.usage._UsageScenarioStateMachine.Off.stateGraphRoot declared as 'outer '.
  The existing 'inner' components are:
  There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: Modelica.StateGraph.Step$_HumidifierSystem$humidifier$usage$_UsageScenarioStateMachine$Off.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.
Warning: [1325:7-1325:57]No corresponding 'inner' declaration found for component .Modelica.StateGraph.Interfaces.CompositeStepState _HumidifierSystem.humidifier.usage._UsageScenarioStateMachine.Started.stateGraphRoot declared as 'outer '.
  The existing 'inner' components are:
  There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: Modelica.StateGraph.Step$_HumidifierSystem$humidifier$usage$_UsageScenarioStateMachine$Started.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.
Warning: [1325:7-1325:57]No corresponding 'inner' declaration found for component .Modelica.StateGraph.Interfaces.CompositeStepState _HumidifierSystem.humidifier.control._ControlStateMachine.ControlStateMachine_region1_pseudostate7.stateGraphRoot declared as 'outer '.
  The existing 'inner' components are:
  There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: Modelica.StateGraph.InitialStep$_HumidifierSystem$humidifier$control$_ControlStateMachine$ControlStateMachine_region1_pseudostate7.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.
Warning: [1325:7-1325:57]No corresponding 'inner' declaration found for component .Modelica.StateGraph.Interfaces.CompositeStepState _HumidifierSystem.humidifier.control._ControlStateMachine.Off.stateGraphRoot declared as 'outer '.
  The existing 'inner' components are:
  There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: Modelica.StateGraph.Step$_HumidifierSystem$humidifier$control$_ControlStateMachine$Off.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.
Warning: [1325:7-1325:57]No corresponding 'inner' declaration found for component .Modelica.StateGraph.Interfaces.CompositeStepState _HumidifierSystem.humidifier.control._ControlStateMachine.On.stateGraphRoot declared as 'outer '.
  The existing 'inner' components are:
  There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: Modelica.StateGraph.Step$_HumidifierSystem$humidifier$control$_ControlStateMachine$On.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.
Warning: [1325:7-1325:57]No corresponding 'inner' declaration found for component .Modelica.StateGraph.Interfaces.CompositeStepState _HumidifierSystem.humidifier.control._ControlStateMachine.WarmUp.stateGraphRoot declared as 'outer '.
  The existing 'inner' components are:
  There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: Modelica.StateGraph.Step$_HumidifierSystem$humidifier$control$_ControlStateMachine$WarmUp.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.
Warning: [1325:7-1325:57]No corresponding 'inner' declaration found for component .Modelica.StateGraph.Interfaces.CompositeStepState _HumidifierSystem.humidifier.control._ControlStateMachine.CoolDown.stateGraphRoot declared as 'outer '.
  The existing 'inner' components are:
  There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: Modelica.StateGraph.Step$_HumidifierSystem$humidifier$control$_ControlStateMachine$CoolDown.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.
Warning: [211:78-211:108]In component _HumidifierSystem.humidifier.control._ControlStateMachine, in relation waterVolumeIn == /*Real*/(0),  ==  on Real numbers is only allowed inside functions.
Warning: [209:78-209:100]In component _HumidifierSystem.humidifier.control._ControlStateMachine, in relation swtch == /*Real*/(1),  ==  on Real numbers is only allowed inside functions.
Warning: [210:78-210:100]In component _HumidifierSystem.humidifier.control._ControlStateMachine, in relation swtch == /*Real*/(0),  ==  on Real numbers is only allowed inside functions.
Warning: [214:78-214:100]In component _HumidifierSystem.humidifier.control._ControlStateMachine, in relation swtch == /*Real*/(0),  ==  on Real numbers is only allowed inside functions.
Warning: Parameter _HumidifierSystem.room.sVP.p2 has no value, and is fixed during initialization (fixed = true), using available start value (start = 7.5) as default value.
Warning: Parameter _HumidifierSystem.room.sVP.roomTemperature has no value, and is fixed during initialization (fixed = true), using available start value (start = 30.0) as default value.
Warning: Parameter _HumidifierSystem.room.sVP.p1 has no value, and is fixed during initialization (fixed = true), using available start value (start = 6.11) as default value.
Warning: Parameter _HumidifierSystem.room.sVP.logBase has no value, and is fixed during initialization (fixed = true), using available start value (start = 10.0) as default value.
Warning: Parameter _HumidifierSystem.room.sVP.celciusOffset has no value, and is fixed during initialization (fixed = true), using available start value (start = 273.0) as default value.
Warning: Parameter _HumidifierSystem.room.sVP.hPa2Pa has no value, and is fixed during initialization (fixed = true), using available start value (start = 100.0) as default value.
Warning: Parameter _HumidifierSystem.room.rH.hB.airExchangeRate has no value, and is fixed during initialization (fixed = true), using available start value (start = 1e-08) as default value.
Warning: Parameter _HumidifierSystem.room.rH.hB.envHumidity has no value, and is fixed during initialization (fixed = true), using available start value (start = 0.35) as default value.
Warning: Parameter _HumidifierSystem.room.rH.hB.volume has no value, and is fixed during initialization (fixed = true), using available start value (start = 25000.0) as default value.
Warning: Parameter _HumidifierSystem.room.rH.vPC.roomTemperature has no value, and is fixed during initialization (fixed = true), using available start value (start = 30.0) as default value.
Warning: Parameter _HumidifierSystem.room.rH.vPC.gasConst has no value, and is fixed during initialization (fixed = true), using available start value (start = 8.314) as default value.
Warning: Parameter _HumidifierSystem.room.rH.vPC.molecularW has no value, and is fixed during initialization (fixed = true), using available start value (start = 18.015) as default value.
Warning: Parameter _HumidifierSystem.room.rH.vPC.celciusOffset has no value, and is fixed during initialization (fixed = true), using available start value (start = 273.0) as default value.
Warning: Parameter _HumidifierSystem.room.rH.vPC.volume has no value, and is fixed during initialization (fixed = true), using available start value (start = 25000.0) as default value.
Warning: Parameter _HumidifierSystem.room.rH.relHumCalc.C2 has no value, and is fixed during initialization (fixed = true), using available start value (start = 1.0) as default value.
Warning: Parameter _HumidifierSystem.room.mLpH2mLpS.gain has no value, and is fixed during initialization (fixed = true), using available start value (start = 0.00028) as default value.
Warning: Parameter _HumidifierSystem.room.toPercentage.gain has no value, and is fixed during initialization (fixed = true), using available start value (start = 100.0) as default value.
Warning: Parameter _HumidifierSystem.humidifier.heaterControl.prLow has no value, and is fixed during initialization (fixed = true), using available start value (start = 0.0) as default value.
Warning: Parameter _HumidifierSystem.humidifier.heaterControl.prHigh has no value, and is fixed during initialization (fixed = true), using available start value (start = 1.0) as default value.
Warning: Parameter _HumidifierSystem.humidifier.heaterControl.threshold has no value, and is fixed during initialization (fixed = true), using available start value (start = 0.5) as default value.
Warning: Parameter _HumidifierSystem.humidifier.heaterControl.targetHumidityIn has no value, and is fixed during initialization (fixed = true), using available start value (start = 50.0) as default value.
Warning: Parameter _HumidifierSystem.humidifier.watertank.tankVolume has no value, and is fixed during initialization (fixed = true), using available start value (start = 50000.0) as default value.
Warning: Parameter _HumidifierSystem.humidifier.watertank.litpSec2mLitpHr has no value, and is fixed during initialization (fixed = true), using available start value (start = 3600000.0) as default value.
Warning: Parameter _HumidifierSystem.humidifier.control.safeTemperature has no value, and is fixed during initialization (fixed = true), using available start value (start = 50.0) as default value.
Warning: Parameter _HumidifierSystem.humidifier.vaporGenerationPlant.h.tI.specificHeat has no value, and is fixed during initialization (fixed = true), using available start value (start = 4180.0) as default value.
Warning: Parameter _HumidifierSystem.humidifier.vaporGenerationPlant.h.tI.waterVolume has no value, and is fixed during initialization (fixed = true), using available start value (start = 0.1) as default value.
Warning: Parameter _HumidifierSystem.humidifier.vaporGenerationPlant.h.hC.C1 has no value, and is fixed during initialization (fixed = true), using available start value (start = 1.0) as default value.
Warning: Parameter _HumidifierSystem.humidifier.vaporGenerationPlant.e.eC.evaporationHeat has no value, and is fixed during initialization (fixed = true), using available start value (start = 2270.0) as default value.
Warning: Parameter _HumidifierSystem.humidifier.vaporGenerationPlant.e.eC.specificHeat has no value, and is fixed during initialization (fixed = true), using available start value (start = 1.996) as default value.
Warning: Parameter _HumidifierSystem.humidifier.vaporGenerationPlant.e.eC.boilingTemperature has no value, and is fixed during initialization (fixed = true), using available start value (start = 100.0) as default value.
Warning: Parameter _HumidifierSystem.humidifier.vaporGenerationPlant.e.eC.environmentTemperature has no value, and is fixed during initialization (fixed = true), using available start value (start = 20.0) as default value.
Warning: Parameter _HumidifierSystem.humidifier.vaporGenerationPlant.e.eC2.boilingTemperature has no value, and is fixed during initialization (fixed = true), using available start value (start = 99.98999999999999) as default value.
Warning: Parameter _HumidifierSystem.humidifier.vaporGenerationPlant.e.eC2.noPower has no value, and is fixed during initialization (fixed = true), using available start value (start = 0.0) as default value.
Warning: Parameter _HumidifierSystem.humidifier.vaporGenerationPlant.e.eC2.litPSec2mLitPHour has no value, and is fixed during initialization (fixed = true), using available start value (start = 3600000.0) as default value.
Warning: Parameter _HumidifierSystem.humidifier.vaporGenerationPlant.r.roomTemperature has no value, and is fixed during initialization (fixed = true), using available start value (start = 30.0) as default value.
Warning: Parameter _HumidifierSystem.humidifier.vaporGenerationPlant.r.radiationFactor has no value, and is fixed during initialization (fixed = true), using available start value (start = 0.1) as default value.
Warning: Parameter _HumidifierSystem.humidifier.vaporGenerationPlant.r.fanEfficiency has no value, and is fixed during initialization (fixed = true), using available start value (start = 0.1) as default value.
Warning: Parameter _HumidifierSystem.humidifier.vaporGenerationPlant.vGPC.maxHeaterPower has no value, and is fixed during initialization (fixed = true), using available start value (start = 400.0) as default value.
Warning: [1390:9-1391:7]The variable _HumidifierSystem.humidifier.usage._UsageScenarioStateMachine.UsageScenarioStateMachine_region1_transition1.t_start is inferred to be discrete due to use with pre outside a when clause. It is recommended to declare the variable as discrete.
Warning: [1390:9-1391:7]The variable _HumidifierSystem.humidifier.usage._UsageScenarioStateMachine.UsageScenarioStateMachine_region1_transition0.t_start is inferred to be discrete due to use with pre outside a when clause. It is recommended to declare the variable as discrete.
Notification: The initialization problem is underdetermined, the following variables were chosen to be initialized from their start values: _HumidifierSystem.humidifier.vaporGenerationPlant.h.hC.xIntg, _HumidifierSystem.room.rH.relHumCalc.xInt, _HumidifierSystem.humidifier.watertank.xInteg
Validation of model HumidifierSystem completed successfully.
The model has 107 variables and 107 equations.
Among these, 2 variables are declared as 'outer'.
Execution error for HumidifierSystem:

Internal error: Codegen.generateZeroCrossingStatement: Unexpected relation:  EQUAL
Validation for TestBed (for SignalProcessor):

[15] 21:58 Validation of model TestBed.TestBed 
Warning: Parameter dSP.a.g has no value, and is fixed during initialization (fixed = true), using available start value (start = 2.0) as default value.
Warning: Parameter dSP.hPF.alpha has no value, and is fixed during initialization (fixed = true), using available start value (start = 0.01) as default value.
Warning: Parameter dSP.lPF.alpha has no value, and is fixed during initialization (fixed = true), using available start value (start = 3.0) as default value.
Warning: Parameter inputSignal.amp has no value, and is fixed during initialization (fixed = true), using available start value (start = 3.0) as default value.
Error: Overdetermined initial equation system.
Error: The initialization problem is structurally singular, the following equations cannot be solved for any variable:
    dSP.hPF.xi = $START.dSP.hPF.xi /* From simulation settings. */
  Given the following equations:
    scopeSignalOutput.scope = $START.scopeSignalOutput.scope /* From simulation settings. */
    dSP.lPF.xi = $START.dSP.lPF.xi /* From simulation settings. */
    inputSignal.y = inputSignal.amp * sin(6.28 * time) + 3.0 * sin(3.14 * time) + 10.0 * sin(2.0 * time)
    scopeSignalOutput.scope = 0.5 * (dSP.m.u1 + dSP.lPF.xi)
    dSP.lPF.u = inputSignal.y * dSP.a.g
    dSP.m.u1 = dSP.lPF.u - dSP.hPF.xi
  Solving this kind of initialization problem as one big nonlinear equation system has been deprecated, but can still be enabled with the class annotation __Wolfram_allowOverdeterminedInitialization = true.
Validation of model TestBed.TestBed completed with 2 errors.
Notes
Relevant snippets (from other sources)
Visit also
Visit also (backlinks)
External links
Flags