XPRSbranchobject
- java.lang.Object
-
- com.dashoptimization.XPRSobject
-
- com.dashoptimization.XPRSbranchobject
-
public class XPRSbranchobject extends XPRSobject
Class encapsulating a branch object
-
-
Method Summary
Modifier and Type Method and Description void
addBounds(int ibranch, int nbounds, byte[] cbndtype, int[] mbndcol, double[] dbndval)
void
addBranches(int nbranches)
void
addCuts(int ibranch, int ncuts, XPRScut[] mcutind)
void
addMsgHandlerListener(XPRSmsgHandlerListener listener)
Add a listener for the MsgHandlercallback.void
addMsgHandlerListener(XPRSmsgHandlerListener listener, int priority)
Add the listener for the MsgHandlercallback.void
addMsgHandlerListener(XPRSmsgHandlerListener listener, java.lang.Object data)
Add the listener for the MsgHandlercallback.void
addMsgHandlerListener(XPRSmsgHandlerListener listener, java.lang.Object data, int priority)
Add the listener for the MsgHandlercallback.void
addRows(int ibranch, int nrows, int nelems, byte[] crtype, double[] drrhs, int[] mrbeg, int[] mcol, double[] dval)
void
destroy()
Deallocates resources associated with an XPRSobjectint
getBounds(int ibranch)
int
getBounds(int ibranch, int nbounds_size, byte[] cbndtype, int[] mbndcol, double[] dbndval)
int
getBranches()
void
getID(IntHolder p_id)
java.lang.String
getLastError()
Returns last error message that occurred on this XPRSobjectjava.lang.String
getLastError(IntHolder iMsgCode)
int
getRows(int ibranch)
int
getRows(int ibranch, int nrows_size, IntHolder p_nelems, int nelems_size, byte[] crtype, double[] drrhs, int[] mrbeg, int[] mcol, double[] dval)
void
removeMsgHandlerListener()
Removes all MsgHandler listeners from the object.void
removeMsgHandlerListener(XPRSmsgHandlerListener listener)
Removes the given MsgHandler listener from the object.void
removeMsgHandlerListener(XPRSmsgHandlerListener listener, java.lang.Object data)
Removes the given MsgHandler listener with the given data value from the object.void
removeMsgHandlerListeners()
Remove all listeners for the MsgHandler callbackvoid
setPreferredBranch(int ibranch)
void
setPriority(int ipriority)
int
store()
Commits the branch object to the XPRSprob.void
validate(IntHolder p_status)
-
Methods inherited from class com.dashoptimization.XPRSobject
addMsgHandlerListener, addMsgHandlerListener, isDestroyed
-
-
-
-
Method Detail
-
store
public int store() throws XPRSexception
Commits the branch object to the XPRSprob. Note that the XPRSbranchobject will be invalidated when store() returns.- Throws:
-
XPRSexception
-
destroy
public void destroy() throws XPRSexception
Description copied from class:XPRSobject
Deallocates resources associated with an XPRSobject- Specified by:
-
destroy
in classXPRSobject
- Throws:
-
XPRSexception
-
addBranches
public void addBranches(int nbranches) throws XPRSexception
- Throws:
-
XPRSexception
-
getBranches
public int getBranches() throws XPRSexception
- Throws:
-
XPRSexception
-
setPriority
public void setPriority(int ipriority) throws XPRSexception
- Throws:
-
XPRSexception
-
setPreferredBranch
public void setPreferredBranch(int ibranch) throws XPRSexception
- Throws:
-
XPRSexception
-
addBounds
public void addBounds(int ibranch, int nbounds, byte[] cbndtype, int[] mbndcol, double[] dbndval) throws XPRSexception
- Throws:
-
XPRSexception
-
getBounds
public int getBounds(int ibranch, int nbounds_size, byte[] cbndtype, int[] mbndcol, double[] dbndval) throws XPRSexception
- Throws:
-
XPRSexception
-
getBounds
public int getBounds(int ibranch) throws XPRSexception
- Throws:
-
XPRSexception
-
addRows
public void addRows(int ibranch, int nrows, int nelems, byte[] crtype, double[] drrhs, int[] mrbeg, int[] mcol, double[] dval) throws XPRSexception
- Throws:
-
XPRSexception
-
getRows
public int getRows(int ibranch, int nrows_size, IntHolder p_nelems, int nelems_size, byte[] crtype, double[] drrhs, int[] mrbeg, int[] mcol, double[] dval) throws XPRSexception
- Throws:
-
XPRSexception
-
getRows
public int getRows(int ibranch) throws XPRSexception
- Throws:
-
XPRSexception
-
addCuts
public void addCuts(int ibranch, int ncuts, XPRScut[] mcutind) throws XPRSexception
- Throws:
-
XPRSexception
-
getID
public void getID(IntHolder p_id) throws XPRSexception
- Throws:
-
XPRSexception
-
getLastError
public java.lang.String getLastError() throws XPRSexception
Description copied from class:XPRSobject
Returns last error message that occurred on this XPRSobject- Specified by:
-
getLastError
in classXPRSobject
- Throws:
-
XPRSexception
-
getLastError
public java.lang.String getLastError(IntHolder iMsgCode) throws XPRSexception
- Throws:
-
XPRSexception
-
validate
public void validate(IntHolder p_status) throws XPRSexception
- Throws:
-
XPRSexception
-
addMsgHandlerListener
public void addMsgHandlerListener(XPRSmsgHandlerListener listener) throws XPRSexception
Add a listener for the MsgHandlercallback. Note that an object can have multiple MsgHandler listeners.- Specified by:
-
addMsgHandlerListener
in classXPRSobject
- Parameters:
-
listener
- The listener to which the event will be dispatched. (If null, all MsgHandler listeners will be removed.) - Throws:
-
XPRSexception
-
addMsgHandlerListener
public void addMsgHandlerListener(XPRSmsgHandlerListener listener, java.lang.Object data) throws XPRSexception
Add the listener for the MsgHandlercallback. Note that an object can have multiple MsgHandler listeners.- Specified by:
-
addMsgHandlerListener
in classXPRSobject
- Parameters:
-
listener
- The listener to which the event will be dispatched. (If null, all MsgHandler listeners will be removed.) -
data
- An additional object which will be passed down to the callback function - Throws:
-
XPRSexception
-
addMsgHandlerListener
public void addMsgHandlerListener(XPRSmsgHandlerListener listener, int priority) throws XPRSexception
Add the listener for the MsgHandlercallback. Note that an object can have multiple MsgHandler listeners.- Parameters:
-
listener
- The listener to which the event will be dispatched. (If null, all MsgHandler listeners will be removed.) -
priority
- Listeners with higher priorities are called first - Throws:
-
XPRSexception
-
addMsgHandlerListener
public void addMsgHandlerListener(XPRSmsgHandlerListener listener, java.lang.Object data, int priority) throws XPRSexception
Add the listener for the MsgHandlercallback. Note that an object can have multiple MsgHandler listeners.- Parameters:
-
listener
- The listener to which the event will be dispatched. (If null, all MsgHandler listeners will be removed.) -
data
- An additional object which will be passed down to the callback function -
priority
- Listeners with higher priorities are called first - Throws:
-
XPRSexception
-
removeMsgHandlerListener
public void removeMsgHandlerListener(XPRSmsgHandlerListener listener) throws XPRSexception
Removes the given MsgHandler listener from the object.- Throws:
-
XPRSexception
-
removeMsgHandlerListener
public void removeMsgHandlerListener(XPRSmsgHandlerListener listener, java.lang.Object data) throws XPRSexception
Removes the given MsgHandler listener with the given data value from the object.- Throws:
-
XPRSexception
-
removeMsgHandlerListener
public void removeMsgHandlerListener() throws XPRSexception
Removes all MsgHandler listeners from the object. @deprecated as of Xpress 7.1, please useremoveMsgHandlerListener(XPRSmsgHandlerListener)
orremoveMsgHandlerListeners()
- Specified by:
-
removeMsgHandlerListener
in classXPRSobject
- Throws:
-
XPRSexception
-
removeMsgHandlerListeners
public void removeMsgHandlerListeners() throws XPRSexception
Remove all listeners for the MsgHandler callback- Throws:
-
XPRSexception
-
-
© 2001-2020 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.