AbstractChangeBranchObjectListener
- java.lang.Object
-
- com.dashoptimization.AbstractChangeBranchObjectListener
-
- All Implemented Interfaces:
-
XPRSchangeBranchObjectListener,java.util.EventListener
public abstract class AbstractChangeBranchObjectListener extends java.lang.Object implements XPRSchangeBranchObjectListener
Convenience implementation of XPRSchangeBranchObjectListener. This class has a more convenientchangeBranchObjectEvent(XPRSprob,XPRSbranchobject)function than the interface.
-
-
Constructor Summary
Constructor Description AbstractChangeBranchObjectListener()
-
Method Summary
Modifier and Type Method Description abstract XPRSbranchobjectchangeBranchObjectEvent(XPRSprob prob, XPRSbranchobject obranch)Invoke the callback.voidXPRSchangeBranchObjectEvent(XPRSprob prob, java.lang.Object vContext, XPRSbranchobject obranch, XPRSbranchobjectHolder p_newobject)Handle aChangeBranchObjectevent.
-
-
-
Method Detail
-
XPRSchangeBranchObjectEvent
public final void XPRSchangeBranchObjectEvent(XPRSprob prob, java.lang.Object vContext, XPRSbranchobject obranch, XPRSbranchobjectHolder p_newobject)
Description copied from interface:XPRSchangeBranchObjectListenerHandle aChangeBranchObjectevent. More details aboutChangeBranchObjectevents can be found in the documentation of the corresponding C callback.- Specified by:
-
XPRSchangeBranchObjectEventin interfaceXPRSchangeBranchObjectListener - Parameters:
-
prob- The problem passed to the callback function,chgbranchobject. -
vContext- The user defined data passed asdatawhen setting up the callback. -
obranch- The candidate branching data selected by the Optimizer. Will benullif no candidates exist. -
p_newobject- Optional new branching data to replace the Optimizer's selection. Ifbranchornullis passed back, no change will be applied. - See Also:
- C documentation of XPRSaddcbchgbranchobject()
-
changeBranchObjectEvent
public abstract XPRSbranchobject changeBranchObjectEvent(XPRSprob prob, XPRSbranchobject obranch)
Invoke the callback. Note that the optimizer will take ownership of the returned object and will immediately invalidate it. So do not reference this object afterwards.- Parameters:
-
prob- The problem on which the callback is invoked. -
obranch- The branch that the optimizer proposes (may benull). - Returns:
-
the new branch created by the callback. Return
nullif the callback does not want to create a custom branch and want to use the optimizer's default branch instead.
-
-
© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.
