Table of Contents
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:
A new specialized class: optimization
New attributes for the built-in type Real: free and initialGuess
A new function for accessing the value of a variable at a specified time instant
Class attributes for the specialized class optimization: objective}, startTime, finalTime and static
A new section: constraint
Inequality constraints