Overview
How GenOpt Works
To perform the optimization, GenOpt automatically writes the input files for the simulation program. The generated input files are based on input template files, which are written for the simulation program in use.
GenOpt then starts the simulation program,
checks for possible simulation errors,
reads the value of the function being minimized from the simulation result file
and then determines the new set of input parameters for the next run. The whole process is repeated iteratively until a minimum of the function is found. During the optimization, GenOpt's graphical user interface displays intermediate results online.
GenOpt's graphical user interface.
The back window shows the progress of the optimization,
and the front window shows how to add and remove the displayed data series.
Click on image to enlarge.
If the simulation problem has some underlying constraints, they can be taken into account either by a default implementation or by modifying the function that has to be minimized. GenOpt offers a default scheme for simple constraints on the independent variables (box-constraints), as well as a formalism that allows adding constraints on the dependent variables by use of penalty or barrier functions.
For example, GenOpt could be used to find the area of the windows or different facades of a house that minimizes annual energy use subject to the constraint that each area must be within user-specified minimum and maximum values.
Optimization Algorithms
The following optimization algorithms are implemented:
-
Generalized Pattern Search algorithms (the Hooke-Jeeves and the Coordinate Search algorithm),
which can be run using multiple starting points.
- Particle Swarm Optimization algorithms (for continuous and/or discrete
independent variables),
with inertia weight or constriction coefficient and velocity clamping,
and with a modification that constricts the continuous independent variables
to a mesh to reduce computation time.
- A hybrid global optimization algorithm that uses
Particle Swarm Optimization for the global optimization, and
Hooke-Jeeves for the local optimization.
- Discrete Armijo Gradient algorithm.
- Nelder and Mead's Simplex algorithm.
- Golden Section and Fibonacci algorithms for one-dimensional minimization.
The following algorithms can be used for parametric studies:
- Mesh generator to evaluate a function on all points that belong to a mesh
with equidistant or logarithmic spacing between the mesh points.
- Parametric search where only one independent variable is varied at a time.
Interface for Simulation Program
GenOpt's simulation program interface.
GenOpt has an open interface on both the simulation program side and the optimization algorithm side.
It allows the coupling of any simulation program
(such as EnergyPlus, TRNSYS, SPARK, IDA-ICE, DOE-2, or any user-written program) by simply modifying a configuration file.
The data exchange between GenOpt and the external program is done with text files only.
To do the optimization, GenOpt, based on one or more input template files,
automatically generates the new input files for the simulation program.
To generate such template files,
the user copies the already-defined simulation input files and replaces the numerical values of the independent variables to be modified with keywords. GenOpt then replaces
the keywords with the corresponding numerical values and writes the simulation input files. This approach makes GenOpt capable of writing text input for any simulation program.
In a configuration file, the user can specify how the simulation program
can be started and where GenOpt can find the current value
of the cost function.
This makes it possible to couple any external program to GenOpt without modifying and recompiling either program. The only requirement of the external program is that it must read its input from text files and write the
cost function value plus any possible error messages to a text file.
Interface for Optimization Algorithm
GenOpt's algorithm interface.
Users can easily implement their own optimization algorithms by extending the superclass
Optimizer that offers access to the GenOpt kernel. This superclass
is the interface between the GenOpt kernel and the optimization algorithm; it offers
Methods to retrieve the required settings for the specific algorithm,
the initial values of the independent variables,
possible bounds of the independent variables
and several other methods like evaluating a simulation
with the current set of independent variables
or reporting the results of the optimization run.
Thus, the user has only to deal with
the actual optimization algorithm itself and not with the data handling, output writing,
syntax checking and other tedious work.
Utility classes, such as for linear algebra, can be shared by different algorithms.
|