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

Posts

Posts

Jul-08-20 17:13:18
'simulate" command creates many build files in working directory
Category: Programming

In OMShell, when I define a model and call "simulate(MODELNAME)", my working directory is populated by many .h, .c, .o files which are then compiled into the model to simulate. Is there a way to specify a directory where to put these intermediate build files in? For example:

Code:


class Pendulum "Pendulum"
   constant Real PI=3.141592653589793;
   parameter Real m=1, g=9.81, L=0.5;
   Real F;  // External force tengential to motion
   output Real x(start=0.5),y(start=0);
   output Real vx,vy;      // x and y velocities
equation
   m*der(vx)=-(x/L)*F;     // Force equation in x direction
   m*der(vy)=-(y/L)*F-m*g; // Force equation in y direction
   der(x)=vx;              // Relating x position to x velocity
   der(y)=vy;              // Relating y position to y velocity
   x^2+y^2=L^2;            // Constraining x, y to string length
end Pendulum;

simulate(Pendulum)

I do not see a function argument in "simulate" to specify a directory for those files:
https://build.openmodelica.org/Document … ulate.html

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