ilog.cp

Interface IloCP.Callback

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface and Description
      static class  IloCP.Callback.Reason
      This enumerated type comprises the different reasons for which a user callback can be invoked.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void invoke(IloCP cp, IloCP.Callback.Reason reason)
      This method is invoked by the passed CP object to perform the callback action.
    • Method Detail

      • invoke

        void invoke(IloCP cp,
                  IloCP.Callback.Reason reason)

        This method is invoked by the passed CP object to perform the callback action. You should implement the interface IloCP.Callback, defining the behavior of this function.

        The reason parameter indicates for which reason the callback is being invoked. The current list of reasons is:

        • Destruction: The callback is being called to signal that the IloCP.end member function is being called on the passed IloCP object. During this callback, you must not call any member function on the IloCP object.
        • EndExtraction: The callback is being called to signal that the process of extracting the model to the engine has ended.
        • EndInitialPropagation: The callback is being called to signal that the initial top-level inference (propagation) has been carried out. At this point, you can use domain getters (such as IloCP.getMin(IloIntVar) or IloCP.isPresent(IloIntervalVar)) to retrieve information about variable domains.
        • EndSearch: The callback is being called to signal that the solution search has ended either naturally (through a proof for example), or because of a limit or abort.
        • EndSolve: The callback is being called to signal that the solving process has completed. This callback reason is received after any others in a solve process and can be used as a teardown or a trigger to consolidate information obtained during the solve.
        • ObjBound: The callback is being called to signal that an improved bound has been found to the optimization problem being solved.
        • Periodic: The callback is being called as part of a periodic process during search.
        • Proof: The callback is being called to indicate that a proof of feasibility, infeasibility or optimality (within specified tolerances) has been made.
        • Solution: The callback is being called to indicate that a new (better in the case of an optimization problem) solution has been produced. You can use getters like IloCP.getValue(IloIntVar) to get the values of decision variables.
        • StartExtraction: The callback is being called to signal that the process of extracting the model to the engine has begun.
        • StartInitialPropagation: The callback is being called to signal that the initial top-level inference (propagation) is about to begin. At this point, you can use domain getters (such as IloCP.getMin(IloIntVar) or IloCP.isPresent(IloIntervalVar)) to retrieve information about variable domains.
        • StartSearch: The callback is being called to signal that the solution search process (after initial propagation) is about to begin.
        • StartSolve: The callback is being called to signal that the solving process has just started. This callback reason is received before any others in a solve process and can be used to initialize the callback with information needed for the duration of the solve. When the callback is called for this reason, no information, like objective or bounds will be available on the IloCP object.