- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Openmodelica in Ubuntu 10.04
Openmodelica in Ubuntu 10.04
Openmodelica in Ubuntu 10.04
I've installed Openmodelica in Ubuntu 10.04, and after doing the first User Guide examples, an error appears:
>> simulate(dcmotor,startTime=0.0,stopTime=10.0)
record SimulationResult
resultFile = "Simulation failed.
Error: Error occured while flattening model dcmotor
"
Anybody knows about it?
Thanks,
Jose
Re: Openmodelica in Ubuntu 10.04
Did you load MSL first?
loadModel(Modelica)
Make sure that the loadModel() and loadFile() commands both return true. Note that the testmodels is installed into /usr/share/doc/omc/testmodels/dcmotor.mo on Linux.
- sjoelund.se
- 1700 Posts
Re: Openmodelica in Ubuntu 10.04
Many thanks, Sjoelund,
I tried again and it works! I don't understand what I was wrong, I'm very sorry.
Have a good day,
Jose
Those are my session entrances:
OpenModelica 1.5.0
Copyright (c) OSMC 2002-2009
To get help on using OMShell and OpenModelica, type "help()" and press enter.
>> loadModel(Modelica)
true
>> loadFile("/usr/share/doc/omc/testmodels/dcmotor.mo")
true
>> simulate(dcmotor,startTime=0.0,stopTime=10.0)
record SimulationResult
resultFile = "dcmotor_res.plt"
end SimulationResult;
>> list(dcmotor)
"model dcmotor
Modelica.Electrical.Analog.Basic.Resistor r1(R = 10);
Modelica.Electrical.Analog.Basic.Inductor i1;
Modelica.Electrical.Analog.Basic.EMF emf1;
Modelica.Mechanics.Rotational.Inertia load;
Modelica.Electrical.Analog.Basic.Ground g;
Modelica.Electrical.Analog.Sources.ConstantVoltage v;
equation
connect(v.p,r1.p);
connect(v.n,g.p);
connect(r1.n,i1.p);
connect(i1.n,emf1.p);
connect(emf1.n,g.p);
connect(emf1.flange_b,load.flange_a);
end dcmotor;
"
Re: Openmodelica in Ubuntu 10.04
I am trying to install openmodelica in Ubuntu 10.4. I know I haven't tried everything (i.e. downloading the debs) but I am putting together a script to set up OM (and a raft of other apps) for students, and would prefer to use the managed update approach.
I followed the instructions here:
http://openmodelica.org/index.php/downl … load-linux
This is what my /etc/apt/sources.list looks like:
Code:
deb http://security.ubuntu.com/ubuntu lucid-security main restricted
deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted
deb http://security.ubuntu.com/ubuntu lucid-security universe
deb-src http://security.ubuntu.com/ubuntu lucid-security universe
deb http://security.ubuntu.com/ubuntu lucid-security multiverse
deb-src http://security.ubuntu.com/ubuntu lucid-security multiverse
deb http://build.openmodelica.org/apt release contrib
I also ran:
Code:
wget -q http://build.openmodelica.org/apt/openmodelica.asc -O- | sudo apt-key add -
then I ran:
Code:
sudo apt-get install openmodelica
and saw:
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
omc omlibrary omnotebook omshell omshell-terminal
The following NEW packages will be installed:
omc omlibrary omnotebook omshell omshell-terminal openmodelica
0 upgraded, 6 newly installed, 0 to remove and 7 not upgraded.
Need to get 21.1MB of archives.
After this operation, 46.1MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Err http://build.openmodelica.org/apt/ release/contrib omc 5717-1
404 Not Found
Err http://build.openmodelica.org/apt/ release/contrib omlibrary 2.2-3
404 Not Found
Err http://build.openmodelica.org/apt/ release/contrib omnotebook 5717-1
404 Not Found
Err http://build.openmodelica.org/apt/ release/contrib omshell 5717-1
404 Not Found
Err http://build.openmodelica.org/apt/ release/contrib omshell-terminal 5717-1
404 Not Found
Err http://build.openmodelica.org/apt/ release/contrib openmodelica 5717-1
404 Not Found
Failed to fetch http://build.openmodelica.org/apt//home/build/debian-apt/pool/contrib/omc_5717-1_i386.deb 404 Not Found
Failed to fetch http://build.openmodelica.org/apt//home/build/debian-apt/pool/contrib/omlibrary_2.2-3_all.deb 404 Not Found
Failed to fetch http://build.openmodelica.org/apt//home/build/debian-apt/pool/contrib/omnotebook_5717-1_i386.deb 404 Not Found
Failed to fetch http://build.openmodelica.org/apt//home/build/debian-apt/pool/contrib/omshell_5717-1_i386.deb 404 Not Found
Failed to fetch http://build.openmodelica.org/apt//home/build/debian-apt/pool/contrib/omshell-terminal_5717-1_i386.deb 404 Not Found
Failed to fetch http://build.openmodelica.org/apt//home/build/debian-apt/pool/contrib/openmodelica_5717-1_i386.deb 404 Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
any ideas?
Re: Openmodelica in Ubuntu 10.04
Try updating and install again. I switched the makefile to use relative paths instead (I guess when I tested it on my machine, the files were already cached and never actually downloaded from server).
- sjoelund.se
- 1700 Posts
Re: Openmodelica in Ubuntu 10.04
Gah, spoke too soon:
Code:
Get:2 http://build.openmodelica.org release Release [2,148B]
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
omc omlibrary omnotebook omshell omshell-terminal
The following NEW packages will be installed:
omc omlibrary omnotebook omshell omshell-terminal openmodelica
0 upgraded, 6 newly installed, 0 to remove and 7 not upgraded.
Need to get 20.3MB/21.1MB of archives.
After this operation, 46.1MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://build.openmodelica.org/apt/ release/contrib omc 5717-1 [18.7MB]
Get:2 http://build.openmodelica.org/apt/ release/contrib omnotebook 5717-1 [1,481kB]
Get:3 http://build.openmodelica.org/apt/ release/contrib omshell 5717-1 [64.5kB]
Get:4 http://build.openmodelica.org/apt/ release/contrib omshell-terminal 5717-1 [23.6kB]
Get:5 http://build.openmodelica.org/apt/ release/contrib openmodelica 5717-1 [6,030B]
Fetched 20.3MB in 4min 29s (75.3kB/s)
Failed to fetch http://build.openmodelica.org/apt/pool/contrib/omc_5717-1_i386.deb Size mismatch
Failed to fetch http://build.openmodelica.org/apt/pool/contrib/omnotebook_5717-1_i386.deb Size mismatch
Failed to fetch http://build.openmodelica.org/apt/pool/contrib/omshell_5717-1_i386.deb Size mismatch
Failed to fetch http://build.openmodelica.org/apt/pool/contrib/omshell-terminal_5717-1_i386.deb Size mismatch
Failed to fetch http://build.openmodelica.org/apt/pool/contrib/openmodelica_5717-1_i386.deb Size mismatch
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Tried again with --fix-missing, no dice (though i did get omlibrary, which suggests maybe a new build is being run?)
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
omc omlibrary omnotebook omshell omshell-terminal
The following NEW packages will be installed:
omc omlibrary omnotebook omshell omshell-terminal openmodelica
0 upgraded, 6 newly installed, 0 to remove and 7 not upgraded.
Need to get 20.3MB/21.1MB of archives.
After this operation, 46.1MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://build.openmodelica.org/apt/ release/contrib omc 5717-1 [18.7MB]
Get:2 http://build.openmodelica.org/apt/ release/contrib omnotebook 5717-1 [1,481kB]
Get:3 http://build.openmodelica.org/apt/ release/contrib omshell 5717-1 [64.5kB]
Get:4 http://build.openmodelica.org/apt/ release/contrib omshell-terminal 5717-1 [23.6kB]
Get:5 http://build.openmodelica.org/apt/ release/contrib openmodelica 5717-1 [6,030B]
Fetched 20.3MB in 4min 23s (76.9kB/s)
Failed to fetch http://build.openmodelica.org/apt/pool/contrib/omc_5717-1_i386.deb Size mismatch
Failed to fetch http://build.openmodelica.org/apt/pool/contrib/omnotebook_5717-1_i386.deb Size mismatch
Failed to fetch http://build.openmodelica.org/apt/pool/contrib/omshell_5717-1_i386.deb Size mismatch
Failed to fetch http://build.openmodelica.org/apt/pool/contrib/omshell-terminal_5717-1_i386.deb Size mismatch
Failed to fetch http://build.openmodelica.org/apt/pool/contrib/openmodelica_5717-1_i386.deb Size mismatch
Selecting previously deselected package omlibrary.
(Reading database ... 137130 files and directories currently installed.)
Unpacking omlibrary (from .../omlibrary_2.2-3_all.deb) ...
Setting up omlibrary (2.2-3) ...
Re: Openmodelica in Ubuntu 10.04
I am getting the following error with file sizes.
~Robert
Get:1 http://build.openmodelica.org/apt/ release/contrib omc 5717-1 [19.6MB]
Get:2 http://build.openmodelica.org/apt/ release/contrib omnotebook 5717-1 [1,498kB]
Get:3 http://build.openmodelica.org/apt/ release/contrib omshell 5717-1 [66.8kB]
Get:4 http://build.openmodelica.org/apt/ release/contrib omshell-terminal 5717-1 [24.4kB]
Get:5 http://build.openmodelica.org/apt/ release/contrib openmodelica 5717-1 [6,030B]
Fetched 30.4kB in 1s (25.5kB/s)
Failed to fetch http://build.openmodelica.org/apt/pool/ … _amd64.deb Size mismatch
Failed to fetch http://build.openmodelica.org/apt/pool/ … _amd64.deb Size mismatch
Failed to fetch http://build.openmodelica.org/apt/pool/ … _amd64.deb Size mismatch
Failed to fetch http://build.openmodelica.org/apt/pool/ … _amd64.deb Hash Sum mismatch
Failed to fetch http://build.openmodelica.org/apt/pool/ … _amd64.deb Size mismatch
Re: Openmodelica in Ubuntu 10.04
Bah, I'll fix the script and post an update when I get a hold of a Linux machine. It might be working now since I cleared the apt-ftparchive cache.
- sjoelund.se
- 1700 Posts
Re: Openmodelica in Ubuntu 10.04
Works on my Ubuntu machine now. Let's hope my script won't rebuild packages that already exist and thus change checksums again...
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Openmodelica in Ubuntu 10.04