Defining an Objective Function

The goal of the optimization process is to find the parameter values that result in a maximum or minimum of a function called the objective function. Objective function is a mathematical expression describing the relationship of the optimization parameters or the result of an operation (such as simulation) that uses the optimization parameters as inputs. The optimization objective is the objective function plus optimization criterion. The latter determines whether the goal of the optimization is to minimize or maximize the value of the objective function.

 To define the objective function
  1. In the Projects view, click the optimization experiment.
  2. In the Properties view, specify the objective function in the Objective edit box.  You can enter any Java expression as an objective function. Since the expression is considered to be in context of the top-level agent, it can access variables and parameters of the top-level agent. The top-level agent is accessible here as root. If your algorithm is rather sophisticated, you can define a function in the top-level agent (e.g. Main), and place the function call in the Objective edit box. Example: root.totalCost()
  3. Define the optimization criterion. Choose Minimize/Maximize option to minimize/maximize your objective function.
The OptQuest Engine obtains a sample of the objective function at the end of each simulation. The engine analyzes a sample, modifies optimization parameters according to its optimization algorithm, and starts a new simulation.

Therefore, optimization is an iterative process where:

Related topics

How-To video: Optimization experiment