Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

3d visualisation win7 in nightly (once again)

3d visualisation win7 in nightly (once again)

Hey,

i've downloaded the nightly today (1.9.2+dev (r23574) to get a test run on Modelica 3D-Mechanics.
I'd love to have some visualisation of the models and I did read what I had found on google and this forum.

So far followed the User Guide, installed Python and PyGTK run the dbus-server.py. This isn't the problem, I guess.

But there seem to be translation/compile problems when using modelica3d library inside of a model (without modellica3d it did work in OMCEdit.

So far I did run as said in the forum.

Code:


loadModel(Modelica);
loadModelica3D();
loadString("model visualizemodel
  extends Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum;
  inner ModelicaServices.Modelica3D.Controller m3d_control;
end visualizemodel;"); getErrorString();
simulate(visualizemodel, startTime=0.0,stopTime=10.0);

which raises some errors in modelica to C translation (listed without mingw errors and stripped paths for easier reading). and the following build of curse fails.

Code:


[package.mo:15:3-18:12:writable] Warning: Ignoring record component:
  ExternalObject ModelicaServices.modbus.Connection conn;
when building record the constructor. Records are allowed to contain only components of basic types, arrays of basic types or other records.
[package.mo:15:3-18:12:writable] Warning: Ignoring record component:
  ExternalObject ModelicaServices.modcount.Context context;
when building record the constructor. Records are allowed to contain only components of basic types, arrays of basic types or other records.
Notification: It was not possible to analyze the given system symbolically, because the relevant equations are part of an algebraic loop. This is not supported yet.
[BackendDAETransform.mo:463:9-463:50:writable] Error: Interner Fehler BackendDAETransform.analyseStrongComponentBlock failed
Sorry - Support for Discrete Equation Systems is not yet implemented
world.x_label.cylinders[2].moved
$PRE.world.x_label.cylinders[2].moved
world.x_label.cylinders[2].moved = $PRE.world.x_label.cylinders[2].moved
world.x_label.cylinders[2].moved = $PRE.world.x_label.cylinders[2].moved
[BackendDAETransform.mo:469:9-469:92:writable] Error: Interner Fehler function analyseStrongComponentBlock failed
[BackendDAETransform.mo:114:7-115:62:writable] Error: Interner Fehler function strongComponentsScalar failed
- sorting equations (strongComponents) failed
Error: Interner Fehler Transformation Module sort components failed!
Warning: No system for the symbolic initialization was generated. A method using numerical algorithms will be used instead.

so I thought I'd start with the first two warnings and make a class out of the ModelicaServices.Modelica3D.State. Well that also didn't work also.

Code:


Notification: It was not possible to analyze the given system symbolically, because the relevant equations are part of an algebraic loop. This is not supported yet.
[BackendDAETransform.mo:463:9-463:50:writable] Error: Interner Fehler BackendDAETransform.analyseStrongComponentBlock failed
Sorry - Support for Discrete Equation Systems is not yet implemented
world.x_label.cylinders[2].moved
$PRE.world.x_label.cylinders[2].moved
world.x_label.cylinders[2].moved = $PRE.world.x_label.cylinders[2].moved
world.x_label.cylinders[2].moved = $PRE.world.x_label.cylinders[2].moved
[BackendDAETransform.mo:469:9-469:92:writable] Error: Interner Fehler function analyseStrongComponentBlock failed
[BackendDAETransform.mo:114:7-115:62:writable] Error: Interner Fehler function strongComponentsScalar failed
- sorting equations (strongComponents) failed
Error: Interner Fehler Transformation Module sort components failed!
Warning: No system for the symbolic initialization was generated. A method using numerical algorithms will be used instead.

It seems that the first error falls to an unfixed error which is listed in trac as #2319?
But in the past the modellica3d seems to work under windows... I had the same problems with the official 1.9.1. build.

Is somebody with some experience able to help me?

ps: here is the mingw error (for the 'record' version), if the problem should be hidden there...

Code:


gcc    -falign-functions -msse2 -mfpmath=sse     "-IC:/OpenModelica1.9.2Nightly/lib/omlibrary/ModelicaServices 3.2.1 modelica3d/Resources/Include" -I"C:/OpenModelica1.9.2Nightly//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME  -c -o visualizemodel.o visualizemodel.c
gcc    -falign-functions -msse2 -mfpmath=sse     "-IC:/OpenModelica1.9.2Nightly/lib/omlibrary/ModelicaServices 3.2.1 modelica3d/Resources/Include" -I"C:/OpenModelica1.9.2Nightly//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME  -c -o visualizemodel_functions.o visualizemodel_functions.c
gcc    -falign-functions -msse2 -mfpmath=sse     "-IC:/OpenModelica1.9.2Nightly/lib/omlibrary/ModelicaServices 3.2.1 modelica3d/Resources/Include" -I"C:/OpenModelica1.9.2Nightly//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME  -c -o visualizemodel_records.o visualizemodel_records.c
gcc    -falign-functions -msse2 -mfpmath=sse     "-IC:/OpenModelica1.9.2Nightly/lib/omlibrary/ModelicaServices 3.2.1 modelica3d/Resources/Include" -I"C:/OpenModelica1.9.2Nightly//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME  -c -o visualizemodel_01exo.o visualizemodel_01exo.c
visualizemodel.c: In Funktion »visualizemodel_eqFunction_21«:
visualizemodel.c:195: Fehler: zu viele Argumente für Funktion »omc_ModelicaServices_Modelica3D_State$m3d__control$state«
visualizemodel.c:195: Fehler: Inkompatibler Typ für Argument 2 von »omc_ModelicaServices_Modelica3D_rotate«
visualizemodel_functions.h:252: Anmerkung: »ModelicaServices_Modelica3D_State« erwartet, aber Argument hat Typ »ModelicaServices_Modelica3D_State$m3d__control$state«
visualizemodel.c:222: Fehler: zu viele Argumente für Funktion »omc_ModelicaServices_Modelica3D_State$m3d__control$state«
visualizemodel.c:222: Fehler: Inkompatibler Typ für Argument 2 von »omc_ModelicaServices_Modelica3D_moveTo«
visualizemodel_functions.h:259: Anmerkung: »ModelicaServices_Modelica3D_State« erwartet, aber Argument hat Typ »ModelicaServices_Modelica3D_State$m3d__control$state«
visualizemodel.c: In Funktion »visualizemodel_eqFunction_22«:

....

visualizemodel_functions.h:337: Anmerkung: »ModelicaServices_Modelica3D_State« erwartet, aber Argument hat Typ »ModelicaServices_Modelica3D_State$m3d__control$state«
mingw32-make: *** [visualizemodel.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....

Re: 3d visualisation win7 in nightly (once again)

Ok, got forward a little.

- First, there is a github, where the current modellica3d is placed.
You need to follow the instructions in that file of the repository.
- Then the "record State" must be removed completely to get this to work (see below).

Now the dbus-server opens it's window, but of curse nothing is displayed. All Shapes which are created by the Mechanics Library have length or other sizes set to zero. I've digged into the dbus-messaging. And followed it back to Modellica3D.PartialShape. Lengh is set to zero there when it is initalised. It seems to happen with the Mechanics.Multibody.Visualiser models. This may be the cause of the messages which appear while translation.

Code:


Notification: It was not possible to analyze the given system symbolically, because the relevant equations are part of an algebraic loop. This is not supported yet.
[Compiler/BackEnd/BackendDAETransform.mo:463:9-463:50:writable] Error: Interner Fehler BackendDAETransform.analyseStrongComponentBlock failed
Sorry - Support for Discrete Equation Systems is not yet implemented
world.x_label.cylinders[2].moved
$PRE.world.x_label.cylinders[2].moved
world.x_label.cylinders[2].moved = $PRE.world.x_label.cylinders[2].moved
world.x_label.cylinders[2].moved = $PRE.world.x_label.cylinders[2].moved
[Compiler/BackEnd/BackendDAETransform.mo:469:9-469:92:writable] Error: Interner Fehler function analyseStrongComponentBlock failed
[Compiler/BackEnd/BackendDAETransform.mo:114:7-115:62:writable] Error: Interner Fehler function strongComponentsScalar failed
- sorting equations (strongComponents) failed
Error: Interner Fehler Transformation Module sort components failed!

Due to the missing loadModelica3D() call in OMEdit I see no possibility to debug this problem. Does anybody has an Idea how to debug this (using the OMShell or other things?)

Here is my new package.mo: packagemo.zip

Edited by: andik86 - Nov-28-14 14:21:52
Attachments:

Re: 3d visualisation win7 in nightly (once again)

OK, got it!

right before weekend ^^

Just use the provided package.mo.

It was an initialisation problem of the shape sizes. the dbus part sent the values to early (thus they were zero). Sending in the algorithm part did fix it.

I'll have weekend and if I won't forget I'll provide a patch which does this with one step...

1417191492_packagemo.zip

There are 0 guests and 0 other users also viewing this topic
You are here: