functionoptimize

Generates an optimization executable for a Modelica/Optimica model and runs it.

Information

Optimizes a Modelica/Optimica model by generating C code, building it and running the optimization executable. The only required argument is the className, while all others have some default values.

Example command:

optimize(A);

Inputs

TypeNameDefaultDescription
TypeNameclassNamethe class that should simulated
RealstartTime"<default>"the start time of the simulation. <default> = 0.0
RealstopTime1.0the stop time of the simulation. <default> = 1.0
IntegernumberOfIntervals500number of intervals in the result file. <default> = 500
RealstepSize0.002step size that is used for the result file. <default> = 0.002
Realtolerance1e-6tolerance used by the integration method. <default> = 1e-6
StringmethodDAE.SCONST("optimization")optimize a modelica/optimica model.
StringfileNamePrefix"<default>"fileNamePrefix. <default> = ""
BooleanstoreInTempfalsestoreInTemp. <default> = false
BooleannoCleanfalsenoClean. <default> = false
Stringoptions"<default>"options. <default> = ""
StringoutputFormat"mat"Format for the result file. <default> = "mat"
StringvariableFilter".*"Only variables fully matching the regexp are stored in the result file. <default> = ".*"
Stringcflags"<default>"cflags. <default> = ""
Stringsimflags"<default>"simflags. <default> = ""

Outputs

TypeNameDefaultDescription
StringoptimizationResults