Click or drag to resize

XPRBprobgetSense Method

Get the sense of the objective function.

Namespace: BCL
Assembly: xprbdn (in xprbdn.dll) Version: 47.01.01+0ba4e76731516b80760698bbaa939494dae84e49
Syntax
public int getSense()

Return Value

Int32
The sense of the current problem's objective function. Possible values:
  • BCLconstant.XPRB_MAXIM – Maximize the objective.
  • BCLconstant.XPRB_MINIM – Minimize the objective.
  • -1 – In the case of an error.
Example
C#
XPRBprob prob = new XPRBprob("NewProb");
...
if(prob.getSense() == BCLconstant.XPRB_MAXIM)
    System.Console.Writeln("A maximization.");
else if(prob.getSense() == BCLconstant.XPRB_MINIM)
    System.Console.Writeln("A minimization.");
else
    System.Console.Writeln("Error in getSense().");
See Also