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
  • » Neo6891
  • » Profile

Posts

Posts

is this environment solved in RC1 ?

Hi there,

I have problem with exporting OPENMODELICAHOME. It's working if I execute omc-start from terminal but ....
I dont want to execute it manualy. I'm opening this shell script with php script: <?php shell_exec("./omc-start; ent | grep OPENMODELICAHOME") ?>.
It gives me good output(HOME is there). But after that I put into terminal "ent" again and there is nothing like OPENMODELICAHOME.

I have to run shell_exec("./omc-start; /usr/lib/omc/bin/omc +d=interactive &") and then connect to omc and get some data from simulation. But simulation is not working without creating this OMHOME.

I'm sorry if this is not correct problem for this forum.

thank you

Apr-28-10 15:23:32
Run socket communication between server - omc

hi,

so I solve this. I made mistake in permissons. The simulate was running always but problem was that omc was not able to create new file. I have to change default /var/www folder for another with standard user permissons. current/smile

Just in case if anybody will have the same problem.

Apr-27-10 01:27:06
Run socket communication between server - omc

yeah I know that COM objects are not available under Unix current/smile I was just looking for plan B if this will not working. COM seems to be easier.
I dont have much time so studying python is not good idea for me. current/smile I'm doing it with php. But problem is that when I send simulate command I get empty output. First time I thought that If I solve this problem with simulation thru telnet then it will work also thru browser. It's really big problem for me. Probably I will read the file right thru sript and not sending it thru socket but still this simulation is needed to create this file. It drives me crazy. current/smile

Anyway is it nessesary to always execute omc-start after rebooting system? Because I always have to run it. The last command in this script is not working by the way. It gives me "help" option.

Is anything telling you this error?  -- [11:13]: error: expecting EOF, found 'simulate' --

Apr-27-10 00:23:05
Run socket communication between server - omc

is it possible to communicate with openmodelica thru COM objects?

Apr-26-10 11:57:23
Run socket communication between server - omc

hi,

is there any other way to get simulation output as using readFile(className_res.plt'')????

thanks

Apr-20-10 21:38:33
Run socket communication between server - omc

wooow thank you very much....now it is working. I really appreciate it.... You have saved my life current/smile

Apr-20-10 20:49:18
Run socket communication between server - omc

there is no output.......

It seems that there will be problem with this OPENMODELICAHOME......

Apr-20-10 20:41:39
Run socket communication between server - omc

but tell me, this simulation it should be working isnt it?

Hi everyone,

I'm runnig omc thru Ubuntu terminal with "omc +d=interactive &" and using it with telnet 127.0.0.1 29500 connection. I'm trying to run some code and simulate it. Puting in code is without problem but simulate(className) is without output. No className_res.plt ist create. I really need that. I'm starting to be hopeless....Is there someone who knows where is a problem?

root@ubuntu:~/omc-tmp# /usr/lib/omc/bin/omc +d=interactive &
[1] 3441
root@ubuntu:~/omc-tmp# telnet 127.0.0.1 29500
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

class heli input Real alfa; Real x1(start = 0); Real x2(start = 0); Real x3(start = 0); Real x4(start = 0); equation der(x1) = x2; der(x3) = x4; der(x2) = -0.65*x2 - 0.02*x4 + 5.4*alfa; der(x4) = -1.57 - 0.03*x4 + 9.8*x1 + 9.8*alfa; end heli;
Ok
Error occured building AST
Syntax Error

simulate(heli)

simulate(heli)

readFile('heli_res.plt')

what can I do?
[1:1]: error: unexpected token: what


I will be very grateful...

Apr-19-10 22:47:23
Run socket communication between server - omc

ok so exit() is not working only quit() and I always use it otherwise it's not possible to run omc +d=interactive & command again.

To second part: I've tried put it to terminal many ways but always giving me "help".  I have try to run first omc +d=interactive and then omc +d=failtrail +showErrorMessages and also nothing, only help and omc still runnig as server in the background.

Apr-19-10 22:03:57
Run socket communication between server - omc

you mean just into ubuntu terminal? I did that and:

root@ubuntu:~/omc-tmp# ls -l heli.makefile heli heli_res.plt
ls: cannot access heli.makefile: No such file or directory
ls: cannot access heli: No such file or directory
ls: cannot access heli_res.plt: No such file or directory
root@ubuntu:~/omc-tmp#  make -f heli.makefile && ./heli
make: heli.makefile: No such file or directory
make: *** No rule to make target `heli.makefile'.  Stop.

Apr-19-10 20:33:33
Run socket communication between server - omc

so I tried this:
___________________________________________________
root@ubuntu:~/omc-tmp# /usr/lib/omc/bin/omc +d=interactive &
[5] 2032
[4]   Done                    /usr/lib/omc/bin/omc +d=interactive

root@ubuntu:~/omc-tmp# telnet 127.0.0.1 29500
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

class heli input Real alfa; Real x1(start = 0); Real x2(start = 0); Real x3(start = 0); Real x4(start = 0); equation der(x1) = x2; der(x3) = x4; der(x2) = -0.65*x2 - 0.02*x4 + 5.4*alfa; der(x4) = -1.57 - 0.03*x4 + 9.8*x1 + 9.8*alfa; end heli;
Oksimulate(heli)

simulate(heli)

plot(x1)
"No simulation result to plot."
_______________________________________________________________

in RC1 the same......

or doing this:
________________________________________
neo@ubuntu:~/omc-tmp$ /usr/lib/omc/bin/omc +d=interactive &
[1] 1924
neo@ubuntu:~/omc-tmp$ telnet 127.0.0.1 29500
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

class heli input Real alfa; Real x1(start = 0); Real x2(start = 0); Real x3(start = 0); Real x4(start = 0); equation der(x1) = x2; der(x3) = x4; der(x2) = -0.65*x2 - 0.02*x4 + 5.4*alfa; der(x4) = -1.57 - 0.03*x4 + 9.8*x1 + 9.8*alfa; end heli;
Oksimulate(heli)
Connection closed by foreign host.
[1]+  Segmentation fault      /usr/lib/omc/bin/omc +d=interactive

neo@ubuntu:~/omc-tmp$
__________________________________________________________

Apr-19-10 20:05:15
Run socket communication between server - omc

Shxt, I'm so tired. current/smile ok...so how do I do it?

Apr-19-10 20:01:12
Run socket communication between server - omc

I'm runing it from /usr/lib/omc/bin/
and ~/omc-tmp/ dont exist ..... this is bad isnt it?

Apr-19-10 19:51:16
Run socket communication between server - omc

ok so I have install openmodelica 1.5.0 RC1 and it still not working. So this is realy bad for me.

Have try this RC1 in linux? Because I runnig it thru terminal.....(not OMShell-terminal) just ubuntu terminal....

./omc +d=interactive &
telnet 127.0.0.1 29500

and in this case it is not working. Thru OMShell-terminal it's working fine.

Apr-19-10 17:21:19
Run socket communication between server - omc

I do that... thank you for your time..... I hope it will work.

frank

Apr-19-10 17:07:04
Run socket communication between server - omc

ok.....I found only RC1 for linux. Is it enough if I just download this files end execute them? Because I did this last time and It seems that it's probably not good...

Apr-19-10 16:46:06
Run socket communication between server - omc

maybe I should.......

witch one do you recommend? 1.5.0 RC2 ??

Apr-19-10 16:35:45
Run socket communication between server - omc

I also try to put simulate right after output OK but still nothing happend... I dont know what else to do. If I do it in OMCShell or OMCShell terminal then it is working but I need to do it thru ubuntu terminal. current/sad I'm trying as client sending this commands thru socket to OMC and I want to make graph from output numbers after simulation.

any Ideas what can be wrong? current/sad

Apr-19-10 16:15:51
Run socket communication between server - omc

Is this "{heli}" your output after you put in "class ..."? Because it's still not working for me. After I put in "class ..." I get "ok" and when I press enter I get message:

Error occured building AST
Syntax Error

then put in simulate(heli) and nothing happend.

Apr-19-10 16:01:34
Run socket communication between server - omc

I'm sorry for bothering. When I put in after "class ...ok" simulate(className) it's doing nothing.

Apr-19-10 15:40:13
Run socket communication between server - omc

oh my god, so stupid.....thank you

Apr-19-10 15:35:28
Run socket communication between server - omc

I'm not shore I understand. So in witch form do I have to put it in?

Apr-19-10 15:22:34
Run socket communication between server - omc

hi, there is another problem. Why it is not working? What's wrong?...

<< root@ubuntu:/usr/lib/omc/bin# ./omc +d=interactive &
[3] 3067
[2]   Done                    ./omc +d=interactive
<< root@ubuntu:/usr/lib/omc/bin# telnet 127.0.0.1 29500
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
class heli input Real alfa; Real x1(start=0); Real x2(start=0); Real x3(start=0); Real x4(start=0); equation der(x1) = x2; der(x3) = x4; der(x2) = -0.65*x2 - 0.02*x4 + 5.4*alfa; der(x4) = -1.57 - 0.03*x4 + 9.8*x1 + 9.8*alfa; end heli
[2:1]: error: expecting SEMICOLON, found ''

simulate(heli)
record SimulationResult
    resultFile = "Simulation Failed. Model: heli does not exists! Please load it first before simulation."
end SimulationResult;

thank you

Hi people,

is there any way to run and stop simulation after one process? Something like "stopTime=1" but not after one sec.

Thank you

Mar-29-10 23:47:56
Simulation failed. g++ not found

Hi,
I have probably the same problem but I'm running OMShell under ubuntu 9.10....

simulate(HelloWorld, stopTime = 2)
record SimulationResult
    resultFile = "Simulation failed.
Error building simulator. Buildlog: g++ -I"/usr/lib/omc/include" -msse2 -mfpmath=sse  -I. -o HelloWorld HelloWorld.cpp -lsim -L"/usr/lib/omc/lib" -lc_runtime -lf2c -lsendData -lQtNetwork -lQtCore -lQtGui
/bin/sh: g++: not found
make: *** [HelloWorld] Error 127

Error building simulator. Buildlog: command "/usr/lib/omc/bin/Compile" not found. Check $OPENMODELICAHOME
"
end SimulationResult;

How to fix this??

thank you,
Frank

Mar-26-10 23:00:17
Run socket communication between server - omc

Thank you very much...it's working....

Mar-26-10 17:07:09
Run socket communication between server - omc

Hi,

I'm new in this.
I'm trying to run openmodelica compiler thru sockets. I'm working under ubuntu 9.10 and using openmodelica 1.4.5. I want simple communication client-server-omc. Client will send some numbers to server and server runs omc and use this numbers,solve them and send back result to client. I'm working with php and I'm able to create sock.comm. between two servers but how to create between server and omc?? I'm found command like ./omc -dbgCmdPort=<port> +d=interactive but dont know how to use it. I was not able to find anything usefull on the internet to this because mostly people are using corba. but I need to use socket communication
I would be very happy if somebody could help me with this problem.

I apologize for my english

with regards,

Frank

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