Chapter 10. Optimica

Table of Contents

1. A new specialized class: optimization
2. Attributes for the built in class Real
3. A Function for accessing instant values of a variable
4. Class attributes
5. Constraints

In this chapter, the Optimica extension will be presented and informally defined. The Optimica extension in described in detail in [Jak2008a], where additional motivations for introducing Optimica can be found. The presentation will be made using the following dynamic optimization problem, based on a double integrator system, as an example:

subject to the dynamic constraint

and

In this problem, the final time, tf, is free, and the objective is thus to minimize the time it takes to transfer the state of the double integrator from the point (0,0) to (1,0), while respecting bounds on the velocity v(t) and the input u(t). A Modelica model for the double integrator system is given by:

model DoubleIntegrator
  Real x(start=0);
  Real v(start=0);
  input Real u;
equation
  der(x)=v;
  der(v)=u;
end DoubleIntegrator;

In summary, the Optimica extension consists of the following elements: