Main

## Main.ObjectiveVariables History

June 16, 2015, at 12:45 PM by 45.56.3.184 -
Deleted lines 0-1:
!! Objective Variables
June 16, 2015, at 12:45 PM by 45.56.3.184 -
Changed line 13 from:
(:table border=1 width=50% align=left bgcolor=#EEEEEE cellspacing=0:)
to:
(:table border=1 width=100% align=left bgcolor=#EEEEEE cellspacing=0:)
September 25, 2008, at 01:44 PM by 158.35.225.230 -
Changed lines 30-31 from:
to:
(:cellnr:)
September 25, 2008, at 01:44 PM by 158.35.225.230 -
!! Objective Variables

Objective variables are defined to construct an objective function.  The objective function is a summation of all variables that are designated as objective-type.  Variables are defined as objective function contributions by starting with '''obj'''.  Thus, the variables ''obj1'', ''objective'', ''object[1]'' would be included in the objective function summation.

Additionally, slack variables are included in the objective function.  These variables begin with the key letters '''slk''' and are defined with a lower bound of zero.

!!! Minimize vs. Maximize

The objective function is always minimized with %blue%A%red%P%black%Monitor.  Objective function maximization is accomplished by defining a new variable that is the negative of the minimized objective.

!!! Example

(:table border=1 width=50% align=left bgcolor=#EEEEEE cellspacing=0:)
(:cellnr:)
! Example model with an objective function
Model example
Parameters
p1 = 5
End Parameters

Variables
objective
v1 > 6
End Variables

Equations
objective = (v1 - p1)^2
End Equations
End Model

Solution
p1 = 5
v1 = 6
objective = 1
(:tableend:)