- Index
- » Users
- » ogduartev
- » Profile
Posts
Posts
In recent versions of OMEdit, I can not plot arrays, because the variable selector square does not appear.
For example, the following simple model run without trouble and I can plot every x[i] as variable plots, but cannot select the array:
model arraytest
Real x[20](start=ones(20));
equation
der(x)=-3*ones(20).*x;
end arraytest;
I use linux, 1.18.0~dev.beta1-3-g75b5528.
Thanks in advance for your help.
Oscar Duarte
Correction:
The name of the test models that I have succesfully compiled is wrong. The right names are
- PowerSystems.Examples.PowerWorld.Test.HydroPlantTest1
- PowerSystems.Examples.PowerWorld.Test.PowerPlantTest1
- PowerSystems.Examples.PowerWorld.Test.PowerPlantTest2
Yesterday I have succesfully compiled and executed with OM some of the tests models of the PowerSystems Library (V 0.2) (https://github.com/modelica/PowerSystem … /v0.2.zip)
The models that I have compiled are:
- PowerSystems.Examples.PowerWorld.Test.HydroPlantTest1
- PowerSystems.Examples.PowerWorld.Test.HydroPlantTest2
- PowerSystems.Examples.PowerWorld.Test.HydroPlantTest3
However, I had to modify two files of the PowerSystems Library to do it:
- File: main package.mo line 118:
original:
replaceable package PackagePhaseSystem =
modified:
package PackagePhaseSystem =
- File: generic.mo, lines 165, 238, 303, 391:
original
isRoot(terminal.theta)
modified
Connections.isRoot(terminal.theta)
I have found that if we simulate using the "csv" output format OMEdit shows a message and then closes. The message is:
"Communication wit OMEdit server has been lost.
OMEdit will close".
The models are well compiled and executed. I mean, the source, executable, 'XXX_int.xml' and 'XXX_res.csv' files are created in the temporary directory. However connection is lost and visualisation is no possible into OMEdit.
The problem is not present with 'mat', 'plt' or 'empty' output formats
I am using linux- 64 and realease 10967.
Thanks,
Oscar Duarte
Thanks for the answer. They are very useful to me!
Thanks for the answer!
Do you know where can I find the specifications of the xml init file?
The output directories in the linux installation are /tmp/OpenModelica and /tmp/OpenModelica/OMEdit
¿Can I change the output directories to some user directory like /home/user/mydir?
Thanks for your help,
Oscar Duarte
The actual stable release (10918) has this bug.
In previous realeses, OpenModelica used XXX_init.txt files that now have been replaced by XXX_init.xml files.
¿is there any simulation option to choice the input format? I mean, something similar to outputFormat="plt"
Thanks in advance for your help.
Oscar Duarte
The RollingWheelSetDriving Example included in Modelica-Mechanics-Multibody-Examples-Elementary compiles, but in runtime generates a zero division error:
ERROR: Division by zero in partial equation: (-wheelSet.wheelSetJoint.rolling2.e_axis_0[2]) / sqrt(wheelSet.wheelSetJoint.rolling2.e_axis_0[2] * wheelSet.wheelSetJoint.rolling2.e_axis_0[2] + wheelSet.wheelSetJoint.rolling2.e_axis_0[1] * wheelSet.wheelSetJoint.rolling2.e_axis_0[1]) because sqrt(wheelSet.wheelSetJoint.rolling2.e_axis_0[2] * wheelSet.wheelSetJoint.rolling2.e_axis_0[2] + wheelSet.wheelSetJoint.rolling2.e_axis_0[1] * wheelSet.wheelSetJoint.rolling2.e_axis_0[1]) == 0.
Simulation call assert() at time 0.006
Level : error
Message : Model error: Argument of sqrt should >= 0
¿any ideas?
thanks in advance for your help...
Oscar
this is the whole message:
record SimulationResult
resultFile = "",
simulationOptions = "startTime = 0.0, stopTime = 86400.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'euler', fileNamePrefix = 'Catenary.DynamicCurve', storeInTemp = false, noClean = false, options = '', outputFormat = 'plt'",
messages = "Simulation failed for model: Catenary.DynamicCurve
Error: Error building simulator. Buildlog: g++ -I. -o Catenary.DynamicCurve Catenary.DynamicCurve.cpp Catenary.DynamicCurve_functions.cpp -L"/home/ogduartev/Proyectos/simula/Catenary/Catenary/../Catenary" -lsim -linteractive -I"/usr/include/omc" -march=native -mfpmath=sse -Wl,-Bsymbolic-functions -lsendData -lQtNetwork -lQtCore -lQtGui -lrt -lpthread -L"/usr/lib/omc" -lc_runtime -lf2c Catenary.DynamicCurve_records.c
Catenary.DynamicCurve.cpp: In function ‘void residualFunc38(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2362: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc37(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2372: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc36(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2382: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc35(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2392: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc34(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2402: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc33(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2412: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc32(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2422: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc31(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2432: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc30(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2442: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc29(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2452: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc28(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2462: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc27(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2472: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc26(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2482: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc25(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2492: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc24(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2502: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc23(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2512: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc22(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2522: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc21(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2532: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc20(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2542: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc19(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2552: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘void residualFunc18(int*, double*, double*, int*)’:
Catenary.DynamicCurve.cpp:2562: error: ‘ASUB_EASY_CASE’ was not declared in this scope
Catenary.DynamicCurve.cpp: In function ‘int initial_function()’:
Catenary.DynamicCurve.cpp:3534: warning: format ‘%f’ expects type ‘double’, but argument 3 has type ‘long int’
Catenary.DynamicCurve.cpp: In function ‘int initial_residual()’:
Catenary.DynamicCurve.cpp:3595: error: ‘ASUB_EASY_CASE’ was not declared in this scope
make: *** [Catenary.DynamicCurve] Error 1
Error: Error building simulator. Buildlog: command g++ not found. Check $OPENMODELICAHOME
Error: Error building simulator. Buildlog: command "/usr/share/omc/scripts/Compile" not found. Check $OPENMODELICAHOME
",
timeFrontend = 0.0,
timeBackend = 0.0,
timeSimCode = 0.0,
timeTemplates = 0.0,
timeCompile = 0.0,
timeSimulation = 0.0,
timeTotal = 0.0
end SimulationResult;
I have a model that was OK in OpenModelica 1.5, but now, when I try to simulate it in 1.6, I get the following error message:
messages = "Simulation failed for model: Catenary.DynamicCurve
Error: Error building simulator. Buildlog: g++ -I. -o Catenary.DynamicCurve Catenary.DynamicCurve.cpp Catenary.DynamicCurve_functions.cpp -L"/home/ogduartev/Proyectos/simula/Catenary/Catenary/../Catenary" -lsim -linteractive -I"/usr/include/omc" -march=native -mfpmath=sse -Wl,-Bsymbolic-functions -lsendData -lQtNetwork -lQtCore -lQtGui -lrt -lpthread -L"/usr/lib/omc" -lc_runtime -lf2c Catenary.DynamicCurve_records.c
Catenary.DynamicCurve.cpp: In function ‘void residualFunc38(int*, double*, double*, int*)’:
I guess an include file is missing. ¿any ideas about how to solve it?
Thanks in advance for your help...
Oscar
I guess something has changed in the last release about how to find a set of consistent initial conditions. I have a model that worked OK in OpenModelica 1.5, but in 1.6 I got the same message.
In my case I solved the problem by adding "(start=XXX)" to an specific variable. The value XXX is just a guess for the initial condition value that should help to find the right initial condition value.
I have used the updated trunk version.
I have noticed a change in the c_runtime/Makefile about FFLAG.
If I use the flag -O the compilation process of my models give me some errors like this (try the BouncigBall3D of the Examples directory):
error: ‘REGREATER’ no se declaró en este ámbito
If I change the flag to -O3 the compilation is succesful.
Again, thanks for your help...
Thanks for the answer!
I have used:
export SENDDATALIBS="-lsendData -lQtNetwork -lQtCore -lQtGui -lz"
and now it compiles
I will try the updated trunk and inform...
Oscar Duarte
I have installed openmodelica & DrModelica in a 64bit linux machine (ubuntu 9.04).They work fine, but when I try to compile a model outside OMShell-terminal or DrModelica I get compilation errors.
For example, in DrModelica I simulate a model named MyModel. I get the c code and the make file, but when I try:
make -f MyModel.makefile
I get some warnings and the following errors:
/home/ogduartev/openmodelica/trunk/build/lib/libsim.a(simulation_result.o): In function `add_result(double*, long*)':
simulation_result.cpp:(.text+0x4c): undefined reference to `Static::enabled()'
simulation_result.cpp:(.text+0x5d7): undefined reference to `sendPacket'
/home/ogduartev/openmodelica/trunk/build/lib/libsim.a(simulation_result.o): In function `deinitializeResult(char const*)':
simulation_result.cpp:(.text+0x1589): undefined reference to `Static::enabled()'
simulation_result.cpp:(.text+0x159f): undefined reference to `closeSendData'
/home/ogduartev/openmodelica/trunk/build/lib/libsim.a(simulation_result.o): In function `initializeResult(long, long, long, long)':
simulation_result.cpp:(.text+0x17d7): undefined reference to `Static::enabled_'
simulation_result.cpp:(.text+0x17e1): undefined reference to `Static::enabled()'
simulation_result.cpp:(.text+0x1817): undefined reference to `initSendData'
collect2: ld devolvió el estado de salida 1
¿Any ideas?
Thanks in advance for your help...
Oscar Duarte
OK. Now it is poltting!
Thanks for all your help! this is an amazing software...
Oscar Duarte
Ups... installation is working but not plotting...
This is the situation:
1) I can run OMShell-terminal and OMNotebook
2) In OMNotebook I can simulate the "HelloWorld" example. The HelloWorld_res.plt is correctly generated by the simulation.
3) If I try plot(x) I get the plotting grid but not the red curve. Instead I get following error message:
"unknown error while plotting"
4) If I try plot(time) I get the plotting grid with the horizontal axes from 0 to 4, no red curve and the following message:
done
If I choose "Simulation data" with the right button menu, I can see the "time" as an available variable of size 0 (zero)
5) If I try in console : ./doPlot HelloWorld_res.plt I get a window with the right figure (three curves: time, x, der(x) )
I would appretiate any help!
Thanks in advance
Oscar Duarte
Thanks!
Instructions are concise and clear. My installation is working...
Oscar Duarte
I am exploring modelica and openmodelica capabilities as a beginner. I have installed the windows version of openmodelica and now I want to install it in a 64 bits linux machine, but the linux binaries I have found are just for 32 bits machines.
The question is: where can I find installation instructions for 64 bits linux machines?
Thanks in advance for your help!
Oscar Duarte
- Index
- » Users
- » ogduartev
- » Profile