OpenModelica


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » Xwang1976
  • » Profile

Posts

Posts

Oct-04-20 10:53:11
Installation error

I have the same issue as you.
Having used Simulink for more than 15 years, I have grown accustomed to being able to run a model and see the evolution of signals at runtime. But trying to do the same thing with OpenModelica doesn't seem to give the desired results.
In fact, by running the attached model in interactive mode, OMedit often freezes and when it works the display in the model is never populated and at the beginning of the simulation the plot page is opened.
Maybe I'm trying to use OMEdit to do something it's not intended for, but the ability to run a simulation and see the value of the signals evolve on the model seems like a basic feature to me.
ProvaScopes.mo

Thank you,
for the next professional experience I would like to learn the modelica language without using OMedit which is counter intuitive for me (maybe I have got too much used to Simulink) and moreover id anyway different from Dymola and other commercial modelica tools which I could find on a working environment, so I do not want to waste time understanding OMedit.
So if I can create models completely in a textual form and then build and simulate them I would e very happy.

Is it necessary to use OMEdit to create and simulate a system model?
Is it possible to create a complete system model in text form (like programming in matlab/python/C) using the libraries models and then simulate it (like you can do with a matlab code with the sim command)?

Dec-06-19 08:22:58
Category: Developer

I've added the  --with-omniORB=/usr option to the configure line so that to have the OMoptim compiled and installed too, but I get the following error at compile time:

Code:


make -C OMOptim/build -f Makefile.unix
make[2]: ingresso nella directory "/home/andreak/tmp/AUR/openmodelica/src/openmodelica-git/OMOptim/OMOptim/build"
/bin/qmake OMOptimLib.pro -o MakefileLib
WARNING: Failure to find: ../GUI/Dialogs/HelpDlg.h
WARNING: Failure to find: ../Core/OMC/StringHandler.h
WARNING: Failure to find: ../Core/Tools/StringHandler.h
WARNING: Failure to find: ../Core/Tools/Helper.h
make -f MakefileLib
make[3]: ingresso nella directory "/home/andreak/tmp/AUR/openmodelica/src/openmodelica-git/OMOptim/OMOptim/build"
g++ -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fPIC -w -D_REENTRANT -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_PRINTSUPPORT_LIB -DQT_WEBKITWIDGETS_LIB -DQT_WIDGETS_LIB -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../build/include/omplot/qwt -I../../../build/include/omc/c/util -isystem /usr/include -I../../ParadisEO-2.0.1/eo/src -I../../ParadisEO-2.0.1/mo/src -I../../ParadisEO-2.0.1/moeo/src -I../../OMOptimBasis/build/release/generatedfiles/ui -Irelease/generatedfiles/ui -I. -I.. -I../.. -I../Core -I../GUI -I../Vld -I../Core/Dymola -I../Core/FileData -I../Core/Infos -I../Core/Modelica -I../Core/OMC -I../Core/OpenModelica -I../Core/Problems -I../Core/Tools -I../Core/Util -I../Core/Units -I../GUI/Dialogs -I../GUI/Plots -I../GUI/Resources -I../GUI/Scene -I../GUI/Tabs -I../GUI/Tools -I../GUI/Views -I../GUI/Widgets -I../Core/Optim -I../Core/Optim/EA -I../Core/Optim/MILP -I../Core/Optim/EA/Checkpoints -I../Core/Optim/EA/Chromosome -I../Core/Optim/EA/Crossover -I../Core/Optim/EA/Evaluations -I../Core/Optim/EA/Init -I../Core/Optim/EA/Monitor -I../Core/Optim/EA/Mutations -I../Core/Optim/EA/NSGA2 -I../Core/Optim/EA/Results -I../Core/Optim/EA/SPEA2 -I../Core/Optim/EA/SPEA2Adaptative -I../Core/Optim/EA/SA1 -I../Core/Optim/EA/PSO -I../../OMOptimBasis -I../../OMOptimBasis/FileData -I../../OMOptimBasis/GUI -I../../OMOptimBasis/GUI/Tools -I../../OMOptimBasis/GUI/Dialogs -I../../OMOptimBasis/GUI/Widgets -I../../OMOptimBasis/Infos -I../../OMOptimBasis/Units -I../../OMOptimBasis/Tools -I../../OMOptimBasis/Problems -isystem /usr/include/qt -isystem /usr/include/qt/QtSvg -isystem /usr/include/qt/QtPrintSupport -isystem /usr/include/qt/QtWebKitWidgets -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtWebKit -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtXml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtCore -Irelease/generatedfiles/moc -Irelease/generatedfiles/ui -I/usr/lib/qt/mkspecs/linux-g++ -o release/generatedfiles/OptObjective.o ../Core/OptObjective.cpp
In file included from /usr/include/c++/9.2.0/bits/stl_algo.h:59,
                 from /usr/include/c++/9.2.0/algorithm:62,
                 from /usr/include/qt/QtCore/qglobal.h:142,
                 from /usr/include/qt/QtCore/QtGlobal:1,
                 from ../Core/OptObjective.h:44,
                 from ../Core/OptObjective.cpp:42:
/usr/include/c++/9.2.0/cstdlib:75:15: fatal error: stdlib.h: File o directory non esistente
   75 | #include_next <stdlib.h>
      |               ^~~~~~~~~~
compilation terminated.
make[3]: *** [MakefileLib:3382: release/generatedfiles/OptObjective.o] Error 1
make[3]: uscita dalla directory "/home/andreak/tmp/AUR/openmodelica/src/openmodelica-git/OMOptim/OMOptim/build"
make[2]: *** [Makefile.unix:19: OMOptimLib] Error 2
make[2]: uscita dalla directory "/home/andreak/tmp/AUR/openmodelica/src/openmodelica-git/OMOptim/OMOptim/build"
make[1]: *** [Makefile:35: omoptim] Error 2
make[1]: uscita dalla directory "/home/andreak/tmp/AUR/openmodelica/src/openmodelica-git/OMOptim"
make: *** [Makefile:36: omoptim.skip] Error 2
==> ERRORE: Si è verificato un errore in build().

Should I open a ticket?

Nov-29-19 08:24:42
Category: Developer

Ok, so it seems nothing that I have to worry about (I'm just starting studying openmodelica so I would like to be sure that the tool is working as expected).
At the moment I've compiled from the git repository (version 1.16.0 from https://github.com/OpenModelica/OpenModelica).
Is it correct or is it better to use a more stable version (1.14 is in beta status)?
In case what is the git command to give to take the more stable version (from a user point of view)?

Nov-28-19 18:51:05
Category: Developer

Running ./runtests.pl fromthe partest folder I get the following result:

Failed tests:
        ./omsimulator/DualMassOscillator.mos
        ./openmodelica/cppruntime/BouncingBall.mos
        ./openmodelica/cppruntime/RefArrayDim2.mos
        ./openmodelica/cppruntime/WhenStatement1.mos
        ./openmodelica/cppruntime/WhenTuple.mos
        ./openmodelica/cppruntime/arraySliceTest.mos
        ./openmodelica/cppruntime/clockedAlgloopTest.mos
        ./openmodelica/cppruntime/clockedEventTest.mos
        ./openmodelica/cppruntime/clockedSolverTest.mos
        ./openmodelica/cppruntime/clockedTest.mos
        ./openmodelica/cppruntime/clockedTypesTest.mos
        ./openmodelica/cppruntime/externalArrayInputTest.mos
        ./openmodelica/cppruntime/fmu/modelExchange/1.0/Crane_FMU1_CPP.mos
        ./openmodelica/cppruntime/fmu/modelExchange/1.0/DIC_FMU1_CPP.mos
        ./openmodelica/cppruntime/fmu/modelExchange/2.0/DIC_FMU2_CPP.mos
        ./openmodelica/cppruntime/fmu/modelExchange/2.0/testArrayEquations.mos
        ./openmodelica/cppruntime/fmu/modelExchange/2.0/testCSTR.mos
        ./openmodelica/cppruntime/fmu/modelExchange/2.0/testClockDescription.mos
        ./openmodelica/cppruntime/fmu/modelExchange/2.0/testDrumBoiler.mos
        ./openmodelica/cppruntime/fmu/modelExchange/2.0/testFMU2MatrixIO.mos
        ./openmodelica/cppruntime/fmu/modelExchange/2.0/testModelDescription.mos
        ./openmodelica/cppruntime/functionPointerTest.mos
        ./openmodelica/cppruntime/genDebugSymbols/Modelica.Fluid.Examples.BranchingDynamicPipes_genDebugSymbols.mos
        ./openmodelica/cppruntime/hardcodedStartValues/Modelica.Fluid.Examples.BranchingDynamicPipes_hardcodedStartValues.mos
        ./openmodelica/cppruntime/hpcom/Modelica.Electrical.Analog.Examples.CauerLowPassSC_level_omp_measureTime.mos
        ./openmodelica/cppruntime/hpcom/Modelica.Electrical.Analog.Examples.CauerLowPassSC_levelfix_pthreads_memory.mos
        ./openmodelica/cppruntime/hpcom/Modelica.Electrical.Spice3.Examples.CoupledInductors_level_omp.mos
        ./openmodelica/cppruntime/hpcom/Modelica.Electrical.Spice3.Examples.CoupledInductors_list_pthreads_spin.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Blocks.Examples.BooleanNetwork1.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Blocks.Examples.Filter.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Electrical.Analog.Examples.CauerLowPassSC.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Electrical.Analog.Examples.ShowSaturatingInductor.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Electrical.Digital.Examples.Counter.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Electrical.QuasiStationary.SinglePhase.Examples.ParallelResonance.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Electrical.Spice3.Examples.CoupledInductors.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Mechanics.MultiBody.Examples.Elementary.RollingWheelSetDriving.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Mechanics.MultiBody.Examples.Elementary.SpringWithMass.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Mechanics.Rotational.Examples.Backlash.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Mechanics.Rotational.Examples.RollingWheel.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Mechanics.Translational.Examples.Accelerate.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Mechanics.Translational.Examples.InitialConditions.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Media.Examples.IdealGasH2O.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Media.Examples.TestOnly.IdealGasN2.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Media.Examples.Tests.MediaTestModels.Air.DryAirNasa.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Media.Examples.WaterIF97.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.StateGraph.Examples.FirstExample.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperature.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Thermal.HeatTransfer.Examples.TwoMasses.mos
        ./openmodelica/cppruntime/libraries/msl32/Modelica.Utilities.Examples.readRealParameterModel.mos
        ./openmodelica/cppruntime/mathFunctionsTest.mos
        ./openmodelica/cppruntime/nameClashTest.mos
        ./openmodelica/cppruntime/negatedParameter.mos
        ./openmodelica/cppruntime/recordTupleReturnTest.mos
        ./openmodelica/cppruntime/solveTest.mos
        ./openmodelica/cppruntime/tearnonlin1.mos
        ./openmodelica/cppruntime/testArrayEquations.mos
        ./openmodelica/cppruntime/testMatrixIO.mos
        ./openmodelica/cppruntime/testVectorizedBlocks.mos
        ./openmodelica/cppruntime/testVectorizedPowerSystem.mos
        ./openmodelica/cppruntime/testVectorizedSolarSystem.mos
        ./openmodelica/cppruntime/trapezoidTest.mos
        ./openmodelica/cruntime/optimization/basic/TFC6.mos
        ./openmodelica/cruntime/optimization/basic/testAlgLoop6.mos
        ./openmodelica/cruntime/optimization/basic/testAlgLoop7.mos
        ./openmodelica/cruntime/optimization/basic/testDerInput.mos
        ./openmodelica/cruntime/optimization/benchmark/runDrumBoiler.mos
        ./openmodelica/cruntime/optimization/benchmark/runReduceDrumBoiler.mos
        ./simulation/libraries/msl32/Modelica.Electrical.Analog.Examples.DifferenceAmplifier.mos
        ./simulation/libraries/msl32/Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_DOL.mos
        ./simulation/modelica/initialization/startValue2.mos
        ./simulation/modelica/nonlinear_system/bug_2841.mos
        ./simulation/modelica/statemachines/EnteringByReset.mos
        ./simulation/modelica/statemachines/SMGraphicalTestCases_DeepHierarchy.mos
        ./simulation/modelica/statemachines/Ticket4618.mos
        ./simulation/modelica/synchronous/EventClock_cpp.mos
        ./simulation/modelica/synchronous/boolSubClocks.mos
        ./simulation/modelica/tearing/Tearing18-minimal.mos

78 of 4046 failed

Nov-28-19 17:08:14
Category: Developer

Those errors happen only when I use the --with-cppruntime option.
Without that option I managed to compile even though by executing make in the testcase directory I've got 102 log files.
Only 14 of those log files contain errors and they are:
cppruntime.log (3 out of 3 tests failed) https://pastebin.com/0EbbD9rF ;
cppruntimeFMU1.log (2 out of 2 tests failed) https://pastebin.com/UPTAadL9 ;
cppruntimeFMU2.log (7 out of 7 tests failed) https://pastebin.com/HXzyuYJ5 ;
cppruntimeGenDebugSymbols.log (1 out of 1 tests failed) https://pastebin.com/W2Bp1bHT ;
cppruntimeHardcodedStartValues.log (1 out of 1 tests failed) https://pastebin.com/Y0jBaeRQ ;
cppruntimeHpcom.log (4 out of 4 tests failed) https://pastebin.com/e194Ms3Y ;
interactive-API.log (1 out of 81 tests failed) https://pastebin.com/a32TyhGC ;
msl32simulation_cpp_mini.log (22 out of 22 tests failed) https://pastebin.com/yatttjzQ ;
msl32simulation.log (2 out of 278 tests failed) https://pastebin.com/M5hT0VwW ;
omsimulator.log (1 out of 12 tests failed) https://pastebin.com/UvRb36wC ;
optimization.log (2 out of 3 tests failed) https://pastebin.com/WwiGd4zp ;
simulationnonlinear_system.log (1 out of 48 tests failed) https://pastebin.com/drms0EG8 ;
simulationstatemachines.log (3 out of 12 tests failed) https://pastebin.com/vP1AHhYN ;
simulationsynchronous.log (2 out of 16 tests failed) https://pastebin.com/Kdi8WRdt .

I would like to now:
1) is it necessary or useful to have a working  --with-cppruntime option?
2) are those filed test something I have to worry about?
3) analysing the resulting arch linux package with namcap (https://pastebin.com/YvguK07W), I see that there are a lot of "Unused shared library" messages. Should I worry about it and in case is there any compilation option I can use to reduce/avoid them?

Nov-27-19 18:42:23
Category: Developer


I'm trying to build on my archlinux openmodelica from the source code taken from git.
I have the following two errors and I do not understand how to solve them.
Can you please help me?

CMakeOutput.doc

CMakeError.txt


Why not an Appimage?
From the user point of you it is easier to install.
(I did not manage to install the flatpack and the compilation from source is not so easy with all the dependencies to fulfil).
So an Appimage (instead of deb and rpm) with alla the dependencies included and in a known and tested version should be better for this kind of software.
Do you agree?

Jun-15-15 20:32:14
Category: Developer

I have had to change my account because my email has not been recognised anymore.
In any case I've run the test, but some of them have failed (pretty the same that failed using svn).
Is there something I'm doing wrongly?
failedTestCases.zip

  • Index
  • » Users
  • » Xwang1976
  • » Profile
You are here: