ilog.concert
Interface IloObjective


public interface IloObjective
extends IloAddable

This interface defines the API for objectives. An objective function is defined by an objective expression and an optimization sense. The objective sense is represented by IloObjectiveSense objects and can be IloObjectiveSense.Minimize or IloObjectiveSense.Maximize.

Both the objective sense and expression can be queried and reset. In addition to this, the CPLEX class IloMPModeler provides methods for manipulating linear objective expressions through its methods setLinearCoef() and setLinearCoefs(). IloMPModeler is available to users of ILOG CPLEX.

See Also:
IloModeler.minimize(IloNumExpr), IloModeler.maximize(IloNumExpr), IloModeler.objective(IloObjectiveSense, IloNumExpr), IloModeler.addMinimize(IloNumExpr), IloModeler.addMaximize(IloNumExpr), IloModeler.addObjective(IloObjectiveSense, IloNumExpr), IloObjectiveSense

Method Summary
 void clearExpr()
          Sets the optimization expression to 0.
 IloNumExpr getExpr()
          Queries the expression of the invoking IloObjective object.
 IloObjectiveSense getSense()
          Queries the optimization sense of the invoking IloObjective object.
 void setExpr(IloNumExpr expr)
          Sets the expression of the invoking IloObjective object.
 void setSense(IloObjectiveSense sense)
          Sets the optimization sense of the invoking IloObjective object.
 
Methods inherited from interface ilog.concert.IloAddable
getName, setName
 

Method Detail

getSense

public IloObjectiveSense getSense()
                           throws IloException
Queries the optimization sense of the invoking IloObjective object.
Returns:
The optimization sense.

setSense

public void setSense(IloObjectiveSense sense)
              throws IloException
Sets the optimization sense of the invoking IloObjective object.
Parameters:
sense - The new optimization sense.

getExpr

public IloNumExpr getExpr()
                   throws IloException
Queries the expression of the invoking IloObjective object.
Returns:
The expression to optimize.

setExpr

public void setExpr(IloNumExpr expr)
             throws IloException
Sets the expression of the invoking IloObjective object.
Parameters:
expr - The new expression to optimize.

clearExpr

public void clearExpr()
               throws IloException
Sets the optimization expression to 0.