Failed
tests / 04 testsuite-clang 1/3 / openmodelica_linearization.test_dump_languages.mos (from (result.xml))
Stacktrace
Output mismatch (see stdout for details)
Standard Output
+ test_dump_languages.mos ... equation mismatch [time: 17] ==== Log /tmp/omc-rtest-unknown/openmodelica/linearization/test_dump_languages.mos_temp1185/log-test_dump_languages.mos true "" true record SimulationResult resultFile = "simple_test_res.mat", simulationOptions = "startTime = 0.0, stopTime = 0.5, numberOfIntervals = 500, tolerance = 1e-6, method = 'dassl', fileNamePrefix = 'simple_test', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", messages = "LOG_STDOUT | info | Linearization will be performed at point of time: 0.500000 LOG_SUCCESS | info | The initialization finished successfully without homotopy method. LOG_SUCCESS | info | The simulation finished successfully. LOG_STDOUT | info | Linear model is created. " end SimulationResult; "Warning: The initial conditions are not fully specified. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->Show additional information from the initialization process, in OMNotebook call setCommandLineOptions(\"-d=initialization\"). " "model linearized_model \"simple_test\" parameter Integer n = 2 \"number of states\"; parameter Integer m = 1 \"number of inputs\"; parameter Integer p = 1 \"number of outputs\"; parameter Real x0[n] = {1.626558527192659, 2.380918053900119}; parameter Real u0[m] = {0}; parameter Real A[n, n] = [-2.887152162670757, -1.626558527192659; -2.380918053900119, -2.388394634992897]; parameter Real B[n, m] = [0; 0]; parameter Real C[p, n] = [0, 0]; parameter Real D[p, m] = [0]; Real x[n](start=x0); input Real u[m](start=u0); output Real y[p]; Real 'x_num.x[1]' = x[1]; Real 'x_num.x[2]' = x[2]; Real 'u_u' = u[1]; Real 'y_y' = y[1]; equation der(x) = A * x + B * u; y = C * x + D * u; end linearized_model; " "" true record SimulationResult resultFile = "simple_test_res.mat", simulationOptions = "startTime = 0.0, stopTime = 0.5, numberOfIntervals = 500, tolerance = 1e-6, method = 'dassl', fileNamePrefix = 'simple_test', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", messages = "LOG_STDOUT | info | Linearization will be performed at point of time: 0.500000 LOG_SUCCESS | info | The initialization finished successfully without homotopy method. LOG_SUCCESS | info | The simulation finished successfully. LOG_STDOUT | info | Linear model is created. " end SimulationResult; "Warning: The initial conditions are not fully specified. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->Show additional information from the initialization process, in OMNotebook call setCommandLineOptions(\"-d=initialization\"). " "function [A, B, C, D, stateVars, inputVars, outputVars] = linearized_model() % simple_test % der(x) = A * x + B * u % y = C * x + D * u n = 2; % number of states m = 1; % number of inputs p = 1; % number of outputs x0 = {1.626558527192659, 2.380918053900119}; u0 = {0}; A =[-2.887152162670757, -1.626558527192659; -2.380918053900119, -2.388394634992897]; B =[0; 0]; C =[0, 0]; D =[0]; stateVars = {'num_x(1)','num_x(2)'}; inputVars = {'u'}; outputVars = {'y'}; Ts = 0.5; % stop time end" "" true record SimulationResult resultFile = "simple_test_res.mat", simulationOptions = "startTime = 0.0, stopTime = 0.5, numberOfIntervals = 500, tolerance = 1e-6, method = 'dassl', fileNamePrefix = 'simple_test', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", messages = "LOG_STDOUT | info | Linearization will be performed at point of time: 0.500000 LOG_SUCCESS | info | The initialization finished successfully without homotopy method. LOG_SUCCESS | info | The simulation finished successfully. LOG_STDOUT | info | Linear model is created. " end SimulationResult; "Warning: The initial conditions are not fully specified. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->Show additional information from the initialization process, in OMNotebook call setCommandLineOptions(\"-d=initialization\"). " "function linearized_model() # simple_test # local n = 2 # number of states local m = 1 # number of inputs local p = 1 # number of outputs local x0 = [1.626558527192659 2.380918053900119] local u0 = [0] local A = [-2.887152162670757 -1.626558527192659; -2.380918053900119 -2.388394634992897] local B = [0; 0] local C = [0 0] local D = [0] stateVars = [\"num_x(1)\",\"num_x(2)\"] inputVars = [\"u\"] outputVars = [\"y\"] Ts = 0.5; #stop time return (n, m, p, x0, u0, A, B, C, D, stateVars, inputVars, outputVars) end" "" true record SimulationResult resultFile = "simple_test_res.mat", simulationOptions = "startTime = 0.0, stopTime = 0.5, numberOfIntervals = 500, tolerance = 1e-6, method = 'dassl', fileNamePrefix = 'simple_test', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", messages = "LOG_STDOUT | info | Linearization will be performed at point of time: 0.500000 LOG_SUCCESS | info | The initialization finished successfully without homotopy method. LOG_SUCCESS | info | The simulation finished successfully. LOG_STDOUT | info | Linear model is created. " end SimulationResult; "Warning: The initial conditions are not fully specified. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->Show additional information from the initialization process, in OMNotebook call setCommandLineOptions(\"-d=initialization\"). " "def linearized_model(): # simple_test # der(x) = A * x + B * u # y = C * x + D * u n = 2 # number of states m = 1 # number of inputs p = 1 # number of outputs x0 = [1.626558527192659, 2.380918053900119] u0 = [0] A = [[-2.887152162670757, -1.626558527192659], [-2.380918053900119, -2.388394634992897]] B = [[0], [0]] C = [[0, 0]] D = [[0]] stateVars = ['num_x(1)','num_x(2)'] inputVars = ['u'] outputVars = ['y'] return (n, m, p, x0, u0, A, B, C, D, stateVars, inputVars, outputVars) " "" Equation mismatch: diff says: --- /tmp/omc-rtest-unknown/openmodelica/linearization/test_dump_languages.mos_temp1185/equations-expected2024-01-20 03:59:46.957020111 +0000 +++ /tmp/omc-rtest-unknown/openmodelica/linearization/test_dump_languages.mos_temp1185/equations-got2024-01-20 04:00:03.844907821 +0000 @@ -1,11 +1,11 @@ true "" true record SimulationResult resultFile = "simple_test_res.mat", -simulationOptions = "startTime = 0.0, stopTime = 0.5, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'simple_test', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", +simulationOptions = "startTime = 0.0, stopTime = 0.5, numberOfIntervals = 500, tolerance = 1e-6, method = 'dassl', fileNamePrefix = 'simple_test', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", messages = "LOG_STDOUT | info | Linearization will be performed at point of time: 0.500000 LOG_SUCCESS | info | The initialization finished successfully without homotopy method. LOG_SUCCESS | info | The simulation finished successfully. LOG_STDOUT | info | Linear model is created. " @@ -14,26 +14,26 @@ " "model linearized_model \"simple_test\" parameter Integer n = 2 \"number of states\"; parameter Integer m = 1 \"number of inputs\"; parameter Integer p = 1 \"number of outputs\"; -parameter Real x0[n] = {1.626558527192664, 2.380918053900121}; +parameter Real x0[n] = {1.626558527192659, 2.380918053900119}; parameter Real u0[m] = {0}; parameter Real A[n, n] = -[-2.887152375617477, -1.62655852935388; --2.380918056675567, -2.388394731625707]; +[-2.887152162670757, -1.626558527192659; +-2.380918053900119, -2.388394634992897]; parameter Real B[n, m] = [0; 0]; parameter Real C[p, n] = [0, 0]; parameter Real D[p, m] = -[4.007476581092785]; +[0]; Real x[n](start=x0); input Real u[m](start=u0); output Real y[p]; @@ -49,11 +49,11 @@ " "" true record SimulationResult resultFile = "simple_test_res.mat", -simulationOptions = "startTime = 0.0, stopTime = 0.5, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'simple_test', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", +simulationOptions = "startTime = 0.0, stopTime = 0.5, numberOfIntervals = 500, tolerance = 1e-6, method = 'dassl', fileNamePrefix = 'simple_test', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", messages = "LOG_STDOUT | info | Linearization will be performed at point of time: 0.500000 LOG_SUCCESS | info | The initialization finished successfully without homotopy method. LOG_SUCCESS | info | The simulation finished successfully. LOG_STDOUT | info | Linear model is created. " @@ -66,22 +66,22 @@ % y = C * x + D * u n = 2; % number of states m = 1; % number of inputs p = 1; % number of outputs -x0 = {1.626558527192664, 2.380918053900121}; +x0 = {1.626558527192659, 2.380918053900119}; u0 = {0}; -A =[-2.887152375617477, -1.62655852935388; --2.380918056675567, -2.388394731625707]; +A =[-2.887152162670757, -1.626558527192659; +-2.380918053900119, -2.388394634992897]; B =[0; 0]; C =[0, 0]; -D =[4.007476581092785]; +D =[0]; stateVars = {'num_x(1)','num_x(2)'}; inputVars = {'u'}; outputVars = {'y'}; Ts = 0.5; % stop time @@ -89,11 +89,11 @@ end" "" true record SimulationResult resultFile = "simple_test_res.mat", -simulationOptions = "startTime = 0.0, stopTime = 0.5, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'simple_test', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", +simulationOptions = "startTime = 0.0, stopTime = 0.5, numberOfIntervals = 500, tolerance = 1e-6, method = 'dassl', fileNamePrefix = 'simple_test', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", messages = "LOG_STDOUT | info | Linearization will be performed at point of time: 0.500000 LOG_SUCCESS | info | The initialization finished successfully without homotopy method. LOG_SUCCESS | info | The simulation finished successfully. LOG_STDOUT | info | Linear model is created. " @@ -104,22 +104,22 @@ # simple_test # local n = 2 # number of states local m = 1 # number of inputs local p = 1 # number of outputs -local x0 = [1.626558527192664 2.380918053900121] +local x0 = [1.626558527192659 2.380918053900119] local u0 = [0] -local A = [-2.887152375617477 -1.62655852935388; --2.380918056675567 -2.388394731625707] +local A = [-2.887152162670757 -1.626558527192659; +-2.380918053900119 -2.388394634992897] local B = [0; 0] local C = [0 0] -local D = [4.007476581092785] +local D = [0] stateVars = [\"num_x(1)\",\"num_x(2)\"] inputVars = [\"u\"] outputVars = [\"y\"] Ts = 0.5; #stop time @@ -129,11 +129,11 @@ end" "" true record SimulationResult resultFile = "simple_test_res.mat", -simulationOptions = "startTime = 0.0, stopTime = 0.5, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'simple_test', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", +simulationOptions = "startTime = 0.0, stopTime = 0.5, numberOfIntervals = 500, tolerance = 1e-6, method = 'dassl', fileNamePrefix = 'simple_test', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", messages = "LOG_STDOUT | info | Linearization will be performed at point of time: 0.500000 LOG_SUCCESS | info | The initialization finished successfully without homotopy method. LOG_SUCCESS | info | The simulation finished successfully. LOG_STDOUT | info | Linear model is created. " @@ -146,25 +146,25 @@ # y = C * x + D * u n = 2 # number of states m = 1 # number of inputs p = 1 # number of outputs -x0 = [1.626558527192664, 2.380918053900121] +x0 = [1.626558527192659, 2.380918053900119] u0 = [0] -A = [[-2.887152375617477, -1.62655852935388], -[-2.380918056675567, -2.388394731625707]] +A = [[-2.887152162670757, -1.626558527192659], +[-2.380918053900119, -2.388394634992897]] B = [[0], [0]] C = [[0, 0]] -D = [[4.007476581092785]] +D = [[0]] stateVars = ['num_x(1)','num_x(2)'] inputVars = ['u'] outputVars = ['y'] Equation mismatch: omc-diff says: Line 34: Real 4.007476581092785 != 0 eps: 0.005000, actual diff: 4.007477 == 1 out of 1 tests failed [openmodelica/linearization/test_dump_languages.mos_temp1185, time: 17]