Creates and returns an objective to optimize the expression
with respect to the sense and adds it to the invoking model.
Namespace: ILOG.CPLEX
Assembly: ILOG.CPLEX (in ILOG.CPLEX.dll) Version: 22.1.1.0
Syntax
| C# |
|---|
public virtual IObjective AddObjective( ObjectiveSense sense, INumExpr expr, string name ) |
| Visual Basic |
|---|
Public Overridable Function AddObjective ( _ sense As ObjectiveSense, _ expr As INumExpr, _ name As String _ ) As IObjective |
Parameters
- sense
- Type: ILOG.Concert..::..ObjectiveSense
- expr
- Type: ILOG.Concert..::..INumExpr
- name
- Type: System..::..String
Implements
IModeler..::..AddObjective(ObjectiveSense, INumExpr, String)
Remarks
Do not use this method in a callback to modify the model currently being optimized.