Initializing help system before first use

XPRBsetsense

XPRBsetsense


Purpose
Set the sense of the objective function.
Synopsis
int XPRBsetsense(XPRBprob prob, int dir);
Arguments
prob 
Reference to a problem.
dir 
Sense of the objective function, which must be one of:
XPRB_MAXIM 
maximize the objective;
XPRB_MINIM 
minimize the objective.
Return value
0 if function executed successfully, 1 otherwise.
Example
XPRBprob expl2;
   ...
expl2 = XPRBnewprob("example2");
XPRBsetsense(expl2, XPRB_MAXIM);
This sets expl2 as a maximization problem.
Further information
This functions sets the objective sense to maximization or minimization. It is set to minimization by default.
Related topics