Optimizer Quick Start
Introduction to Structured Optimization
The Analytica Optimizer releases from v,4.3 onward include a set of features, collectively called Structured Optimization, designed to simplify the optimization modeling process. In Structured Optimization format, Linear Programming (LP), Quadratic Programming (QP) and Nonlinear Programming (NLP) optimizations can all be modeled in similar ways. All types of optimization are specified using the «DefineOptimization()» function.
The «DefineOptimization()» function automatically analyzes your model to determine the type of optimization and selects the appropriate optimization engine, although you can still override this process if desired.
Another significant change associated with Structured Optimization is the introduction of the «Constraint» object type. «Constraint» objects give users the ability to specify constraints, or arrays of constraints, in common expression format using equality or inequality operators. This intuitive interface allows users to easily integrate different types of constraints and to organize constraint arrays efficiently.
This section includes simple NLP examples to demonstrate the roles of Decision variables, Constraint objects, Objective variables, and Decision attributes in the Structured Optimization framework. The same basic structure applies to LP and QP optimizations as well.
Notation
Throughout this guide, we use a shorthand notation for displaying the definitions of Analytica objects. An object’s class (e.g., Variable, Decision, Constraint, etc) and identifier is followed by :=, and then the definition is shown, e.g.:
The Optimum Can Example
The Optimum Can example determines the dimensions of a cylindrical object having a minimum surface area for a given volume. Admittedly, this is not a very interesting optimization problem. In fact, the solution can be derived on paper using basic differential calculus. (Spoiler alert! The optimum can has height equal to twice the radius.) But the simplicity of the example allows us to focus on the workflow and object relationships using the new Structured Optimization framework in Analytica.
Decisions
In this example we will decide on the Radius and Height of a cylindrical vessel. We represent each of these as a Decision variable in the influence diagram. The values we define for these nodes will be used as initial guesses for optimization types that require an initial guess (NLP or non-convex QP). Otherwise the definitions of these inputs are not important. We use 1cm as an initial guess for both the radius and height.
Decision Radius := 1
Decision Height := 1
Constants
Constants have no special interpretation in optimization definitions. They can be used as usual for values that stay constant in the model. In this example, we will use a Constant for the required volume which does not vary in the model.
Constant Required_Volume := 1000
Variables
General variables are used for intermediate values as well as for the central DefineOptimization() function described below. We also use a variable to define Volume of the cylinder.
Variable Volume := pi*Radius^2*Height
Constraints
Constraints contain equalities or inequalities that restrict the range of optimized results. In this example, we use a constraint object to enforce the minimum volume requirement on our can.
Constraint Volume_Constraint := (Volume >= Required_Volume)
Enable comment auto-refresher