# OptReducedCost

## OptReducedCost(opt)

Computes the reduced cost (aka *dual value of the variables*) -- how far a coefficient in the objective function can be increased (in a minimization program) or decreased (in a maximization program) before the objective function changes.

When a decision variable has a non-zero value in the optimal solution, any change in the objective function coefficient changes the objective value, so for those decision variables the answer will be zero. But for decision variables that are zero, the coefficient can change until that variable eventually enters the basis. This amount is known as the reduced cost (or dual value) of the variables and is returned by this function.

The «opt» parameter must be a linear program with all continuous variables, returned from DefineOptimization or LpDefine (the latter is pre-Analytica 4.3).

## Notes

The *shadow price* is also known as a dual value, but is the dual value of a constraint, while the reduced cost is the dual value of the variable.

Enable comment auto-refresher