PsiSlackValue (cell, [optimization], [upper])

PsiSlackValue displays the slack value for the referenced constraint or decision variable in an optimization model.    

  • cell is the Excel reference for the constraint or decision variable
  • optimization (optional) is the optimization index if running multiple optimizations, i.e. "2" would indicate the 2nd optimization. 
  • upper (optional) is a boolean argument that determines the slack value returned. 

If the value of cell A1 = 100 and a constraint exists that A1:D1 <=300, the slack value will be 0 because the constraint is not binding. 

If, however, the constraints A1 >=100 and A1 <= 100 exist, multiple slack values will be returned.  The upper argument determines which slack value to display in the cell. 

If the two constraints exist, one being the upper bound of A1 (A1 <= 100) and one being the lower bound of A1 (A1 >= 100): 

  • and upper is not provided, this function returns the slack value of the lower bound constraint (A1 >= 100).
  • and upper is "false" the slack value of the lower bound constraint (A1 >= 100) is returned.
  • and upper is "true", the slack value of the upper bound constraint (A1 <= 100) is returned. 
  • If only one nonzero slack value is found, that slack value is displayed, no matter if upper is set to true or false. 

For more information on Analytic Solver's Sensitivity Report, see the Analytic Solver User Guide. 

If deploying your Excel model to the Rason server, enter this function in a blank cell on the spreadsheet to receive the slack value, for either a constraint or decision variable, in the results.