Function GMP::Solution::GetPenalizedObjective(GMP, solution1, solution2, skipObj)

GMP::Solution::GetPenalizedObjective

The function GMP::Solution::GetPenalizedObjective calculates the penalized objective for a generated mathematical program by using the level values of the columns in a first solution and the shadow prices in a second solution as the penalty multipliers for the rows. To avoid a very large value, the penalized objective value is divided by the square of the number of rows.

GMP::Solution::GetPenalizedObjective(
     GMP,            ! (input) a generated mathematical program
     solution1,      ! (input) a solution
     solution2,      ! (input) a solution
     [skipObj]       ! (optional, default 0) a scalar value
     )

Arguments

GMP
An element in AllGeneratedMathematicalPrograms.
solution1
An integer scalar reference to a solution.
solution2
An integer scalar reference to a solution.
skipObj
A scalar binary value to indicate whether the objective defining constraint should be skipped (value 1) or not (value 0).

Return Value

In case of success, the penalized objective function value of the GMP associated with both solutions. Otherwise it returns -1e80 for a maximization problem, and 1e80 for a minimization problem (or a feasibility problem).

Note

Assume that \(x\) denotes the level values of the columns in solution1 and \(w\) the shadow prices of the rows in solution2. Then the penalized objective function \(P(x,w)\) is defined as

\[P(x,w) = \frac{f(x) + dirval * \sum_{i=1}^m \big( w_i * viol(g_i(x)) \big)}{m^2} ,\]

where \(f(x)\) denotes the objective function value, \(m\) is the number of rows and the function \(viol(g_i(x))\) equals the absolute amount by which the \(i\)th row is violated at the point \(x\). Here \(dirval\) is 1 in case of minization and -1 in case of maximization.

See also

The procedure GMP::Solution::UpdatePenaltyWeights.