Namespace: ILOG.CPLEX
Assembly: ILOG.CPLEX (in ILOG.CPLEX.dll) Version: 22.1.1.0
Syntax
| C# |
|---|
public virtual void Use( ModelingAssistance..::..Callback callback ) |
| Visual Basic |
|---|
Public Overridable Sub Use ( _ callback As ModelingAssistance..::..Callback _ ) |
Parameters
- callback
- Type: ILOG.CPLEX..::..ModelingAssistance..::..Callback
The new callback to be set or null to clear the callback.
Remarks
During optimization, CPLEX will invoke the callback with information about a particular modeling assistance warning. Call this with callback = null to clear the current callback. To register a callback, provide this method with a non-null callback.
The callback will only be invoked if the CPLEX parameter Cplex.Param.Read.DataCheck is set to Cplex.DataCheck.Assist. In addition, the parameter Cplex.Param.Read.WarningLimit controls the number of times each type of modeling assistance warning will be reported (the rest will be ignored). See CPX_PARAM_DATACHECK and CPX_PARAM_WARNLIM in the Parameters of CPLEX Reference Manual.
Note: The function will always clear any current callback, even if setting the new callback fails. Thus at most one callback can be registered with a single instance of Cplex.
Throws ILOG.Concert.Exception if an error occurs.