Skip to main content
FRAMES NO FRAMES

Class IloModelingAssistance

Definition file: ilcplex/ilomodelasst.h
Map of IloModelingAssistanceIloModelingAssistanceIloModelingAssistance

A namespace for modeling assistance.

This namespace provides the modeling assistance callback interface (see IloModelingAssistance::Callback). For each invocation of the callback, a modeling information ID and warning string are provided (see the IloModelingAssistance::Callback#invoke method).

This namespace also exposes modeling information IDs as defined by the CPLEX Callable Library. These constants define symbolic names for the integer modeling information IDs returned by the Callable Library (C API). The names to which the modeling information IDs are assigned are the same names used in the Callable Library except that the leading CPXMI characters have been left out. For example, the IloModelingAssistance::BIGM_COEF constant corresponds with the CPXMI_BIGM_COEF macro in the Callable Library. The modeling information IDs are accessible through the modeling assistance callback. These symbolic names can be used to test if a particular modeling issue has been detected.

See Also:

Inner structs
IloModelingAssistance::Callback
Inner Struct Detail

Struct IloModelingAssistance::Callback

Definition file: ilcplex/ilomodelasst.h

Interface for modeling assistance callbacks.

Any class to be used as a modeling assistance callback must implement this interface.

See Also:

Method Summary
public virtual voidinvoke(int issueid, char const * message)
Method Detail

invoke

public virtual void invoke(int issueid, char const * message)

Invoked by the modeling assistance callback.

If an object is registered with CPLEX by means of the method IloCplex::use(IloModelingAssistance::Callback*), then CPLEX will invoke this function of the registered object for each modeling assistance warning. These warnings will not be displayed in the engine log as they are by default when no callback is registered. For values of issueid, see the constants in the IloModelingAssistance namespace.

Note

Note: CPLEX will only invoke this function if the CPLEX parameter IloCplex::Param::Read::DataCheck is set to IloCplex::DataCheck::Assist. In addition, the parameter IloCplex::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.

Parameters:

issueid
The modeling assistance issue ID.
message
The modeling assistance warning string.