ilog.concert
Interface IloObjective

All Superinterfaces:
IloAddable

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.
 ilog.concert.IloNumExpr getExpr()
          Queries the expression of the invoking IloObjective object.
 ilog.concert.IloObjectiveSense getSense()
          Queries the optimization sense of the invoking IloObjective object.
 void setExpr(ilog.concert.IloNumExpr expr)
          Sets the expression of the invoking IloObjective object.
 void setSense(ilog.concert.IloObjectiveSense sense)
          Sets the optimization sense of the invoking IloObjective object.
 
Methods inherited from interface ilog.concert.IloAddable
getName, setName
 

Method Detail

getSense

public ilog.concert.IloObjectiveSense getSense()
                                        throws IloException
Queries the optimization sense of the invoking IloObjective object.

Returns:
The optimization sense.
IloException

setSense

public void setSense(ilog.concert.IloObjectiveSense sense)
              throws IloException
Sets the optimization sense of the invoking IloObjective object.

Parameters:
sense - The new optimization sense.
IloException

getExpr

public ilog.concert.IloNumExpr getExpr()
                                throws IloException
Queries the expression of the invoking IloObjective object.

Returns:
The expression to optimize.
IloException

setExpr

public void setExpr(ilog.concert.IloNumExpr expr)
             throws IloException
Sets the expression of the invoking IloObjective object.

Parameters:
expr - The new expression to optimize.
IloException

clearExpr

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

IloException