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
  • Index
  • » Users
  • » dieter-ve
  • » Profile

Posts

Posts

Hello,

Thanks for the quick response,
but how do I have to update the current version to apply this patch/bug fix?

I'm not highly acquainted with svn updating, and where to find r15754 on nightly builds?
currently having omc, omedit, omnotebook and omoptim installed from source on ubuntu x64

regards,
Dieter

Hello,

I'm currently attempting to connect UG NX and modelica.
I'm able to use all the correct header files and libraries (from unigraphics) using the annotations as mentioned in modelica specs 12.9.4

When simulating I'm getting a conflicting type error
/usr/ugs085/ugopen/uf_defs.h:98:23: error: conflicting types for €˜logical
/usr/include/f2c.h:24:13: note: previous declaration of €˜logical€™ was here
Now I see that in uf_defs.h there's an include guard used:
#ifndef LOGICAL_DEFINED
#define LOGICAL_DEFINED
(typedef of 'logical')
#endif

I've attempted to add another guard (LOGICAL_DEFINED might be used in modelica compiler somewhere...) by simply adding
#ifndef DIETER_VE_LOGICAL_DEFINED                                               
#define DIETER_VE_LOGICAL_DEFINED
But still I'm getting the same error...

Any other way to resolve this problem.
I had a similar problem when writing a function to acces mysql data, but there I could simply convert the few conflicting typedefs to comment without doing harm to mysql system. For NX i think the typedef logical might be of greater importance...

kind regards,
Dieter

Hello,

Would it be considered a bad practice to collect several parameters of a multi-component system into a single record?
This would allow a quicker change of a set of parameters, but I don't know whether it's considered as good practice in general.

for example (code snippet below might contains errors, but it's just to illustrate what I mean):
record overview
parameter real p1;
parameter real p2;
end overview;

class one
parameter real p1;
overview myBag;
equations
p1 = myBag.p1;
end one;
class two
parameter real p2;
overview myBag;
equations
p2 = myBag.p2;
end two;

gtz,
Dieter

Mar-15-13 22:05:39
Category: Programming

great! Thank you all for quick responses.

gtz,
Dieter

Mar-14-13 22:59:14
Category: Programming

Hello,

Small question:
How do you check value of a string?
eg.
class tmp
Real a=1;
String b="lol";
end tmp;
=>loadFile, simulate
val(a,0) =>1
val(b,0) =>NaN

gtz,
Dieter

Hi,

you've got error in link u are using as update site in eclipse: there must be a ~ before pelab!
http://www.ida.liu.se/~pelab/modelica/OpenModelica/MDT/

Make sure you got 'Group items by category' UNCHECKED.
I've been using both Indigo(3.7) and Juno(4.2)

gtz,
Dieter

Mar-05-13 02:16:56
specifying session of OMShell-terminal

Edit:

without corba I'm able to connect to an existing server:
shell1:
$/opt/openmodelica1.9.0/bin/omc +d=interactive
shell2:
$/opt/openmodelica1.9.0/bin/OMShell-terminal -noserv

But openmodelica mdt requires an omc server +d=interactiveCorba, so this doesn't solve the problem...

Dieter

Mar-03-13 13:53:18
specifying session of OMShell-terminal

Hello,

I'm currently trying out the Modelica Development Tooling (MDT) Eclipse Plug-In, the MDT console offers direct communication within your session.
I'd like to start a OMShell-terminal within a terminal (bash) in eclipse. How do I force this newly started OMShell-terminal to act on the same session as the session started by eclipse?

- omc process started by eclipse: /opt/openmodelica1.9.0/bin/omc +c=mdt +d=interactiveCorba +g=MetaModelica
- OPENMODELICAHOME=/opt/openmodelica1.9.0
- RMLHOME=/usr/local
- the server started: tcp6  0 :::42381 LISTEN 6363/omc

From help, I know that there's an omc option:  +c, +corbaSessionName      (Sets the name of the corba session if +d=interactiveCorba is used.)
and that there's a OMShell-terminal option:  -corba  (use  CORBA  communication  interface  between the client application OMShell-terminal and the Compiler/Interpreter server omc.)

But I don't know how to use all this information to link a new OMShell-terminal to listen and communicate with the existing server.
I've tried:
$ /opt/openmodelica1.9.0/bin/OMShell-terminal -corba=mdt => new server started
$ /opt/openmodelica1.9.0/bin/OMShell-terminal -corba -noserv => terminate called after throwing an instance of 'CORBA::BAD_PARAM'
$ /opt/openmodelica1.9.0/bin/OMShell-terminal -corba=mdt -noserv =>Error connecting to omc server in interactive mode. : Connection refused

Do I need to specify port someway or another, can't find anything in documentation/man pages.

edit: extra info when starting eclipse:
Dumped Corba IOR in file: /tmp/openmodelica.dieter-ve.objid.mdt
Started the Corba ORB thread with id: 139788831213312

kind regards,
Dieter

  • Index
  • » Users
  • » dieter-ve
  • » Profile
You are here: