Detailed Description
methods for managing variable history
Definition in file gcgvarhistory.h.
Go to the source code of this file.
Functions | |
| SCIP_RETCODE | GCGvarhistoryGetVar (GCG_VARHISTORY *pointer, SCIP_VAR **var) |
| SCIP_Bool | GCGvarhistoryHasNext (GCG_VARHISTORY *pointer) |
| SCIP_RETCODE | GCGvarhistoryNext (SCIP *scip, GCG_VARHISTORY **pointer) |
| SCIP_RETCODE | GCGvarhistoryJumpToLatest (SCIP *scip, GCG_VARHISTORY *pointer) |
| SCIP_RETCODE | GCGvarhistoryJumpAndRetrieveVars (SCIP *scip, GCG_VARHISTORY *pointer, SCIP_VAR ***vars, int *nvars) |
| SCIP_RETCODE | GCGvarhistoryCreate (SCIP *scip, GCG_VARHISTORY **pointer) |
| SCIP_RETCODE | GCGvarhistoryCopyReference (SCIP *scip, GCG_VARHISTORY **pointer, GCG_VARHISTORY *source) |
| SCIP_RETCODE | GCGvarhistoryFreeReference (SCIP *scip, GCG_VARHISTORY **pointer) |
| SCIP_RETCODE | GCGvarhistoryAddVar (SCIP *scip, GCG_VARHISTORY *pointer, SCIP_VAR *var) |
| SCIP_RETCODE | GCGvarhistoryCaptureBuffer (GCG_VARHISTORYBUFFER *buffer) |
| SCIP_RETCODE | GCGvarhistoryReleaseBuffer (SCIP *scip, GCG_VARHISTORYBUFFER **buffer) |
Function Documentation
◆ GCGvarhistoryGetVar()
| SCIP_RETCODE GCGvarhistoryGetVar | ( | GCG_VARHISTORY * | pointer, |
| SCIP_VAR ** | var ) |
get the variable behinde the pointer
- Parameters
-
pointer pointer to the history var pointer to store the variable
Definition at line 72 of file gcgvarhistory.c.
References assert(), GCG_VarHistory::buffer, GCG_VARHISTORYBUFFER_SIZE, GCGvarhistoryGetVar(), GCG_VarHistoryBuffer::next, GCG_VarHistoryBuffer::nvars, GCG_VarHistory::pos, var, and GCG_VarHistoryBuffer::vars.
Referenced by addMissedVariables(), forwardUpdateSeenHistory(), and GCGvarhistoryGetVar().
◆ GCGvarhistoryHasNext()
| SCIP_Bool GCGvarhistoryHasNext | ( | GCG_VARHISTORY * | pointer | ) |
check if there is a next history event
- Parameters
-
pointer pointer to the history
Definition at line 96 of file gcgvarhistory.c.
References assert(), GCG_VarHistory::buffer, GCG_VARHISTORYBUFFER_SIZE, GCGvarhistoryHasNext(), GCG_VarHistoryBuffer::next, GCG_VarHistoryBuffer::nvars, and GCG_VarHistory::pos.
Referenced by addMissedVariables(), forwardUpdateSeenHistory(), and GCGvarhistoryHasNext().
◆ GCGvarhistoryNext()
| SCIP_RETCODE GCGvarhistoryNext | ( | SCIP * | scip, |
| GCG_VARHISTORY ** | pointer ) |
get the next history event
- Parameters
-
scip SCIP data structure pointer pointer to the history
Definition at line 125 of file gcgvarhistory.c.
References assert(), GCG_VARHISTORYBUFFER_SIZE, GCGvarhistoryCaptureBuffer(), GCGvarhistoryNext(), GCGvarhistoryReleaseBuffer(), GCG_VarHistoryBuffer::next, SCIP_CALL(), and SCIPdebugMessage().
Referenced by addMissedVariables(), forwardUpdateSeenHistory(), and GCGvarhistoryNext().
◆ GCGvarhistoryJumpToLatest()
| SCIP_RETCODE GCGvarhistoryJumpToLatest | ( | SCIP * | scip, |
| GCG_VARHISTORY * | pointer ) |
jump to the latest history event
- Parameters
-
scip SCIP data structure pointer pointer to the history
Definition at line 180 of file gcgvarhistory.c.
References assert(), GCG_VarHistory::buffer, GCG_VARHISTORYBUFFER_SIZE, GCGvarhistoryCaptureBuffer(), GCGvarhistoryJumpToLatest(), GCGvarhistoryReleaseBuffer(), GCG_VarHistoryBuffer::next, GCG_VarHistoryBuffer::nvars, GCG_VarHistory::pos, SCIP_CALL(), SCIPdebugMessage(), and GCG_VarHistoryBuffer::vars.
Referenced by ObjPricerGcg::addVariableToMastersepacuts(), forwardUpdateSeenHistory(), GCGvarhistoryJumpToLatest(), ObjPricerGcg::pricingLoop(), SCIP_DECL_CONSACTIVE(), and SCIP_DECL_CONSDEACTIVE().
◆ GCGvarhistoryJumpAndRetrieveVars()
| SCIP_RETCODE GCGvarhistoryJumpAndRetrieveVars | ( | SCIP * | scip, |
| GCG_VARHISTORY * | pointer, | ||
| SCIP_VAR *** | vars, | ||
| int * | nvars ) |
jump to the latest history event and retrieve all new variables
- Parameters
-
scip SCIP data structure pointer pointer to the history vars pointer to store the variables nvars pointer to store the number of variables
Definition at line 213 of file gcgvarhistory.c.
References assert(), GCG_VarHistory::buffer, GCG_VARHISTORYBUFFER_SIZE, GCGvarhistoryCaptureBuffer(), GCGvarhistoryJumpAndRetrieveVars(), GCGvarhistoryReleaseBuffer(), i, GCG_VarHistoryBuffer::next, GCG_VarHistoryBuffer::nvars, nvars, GCG_VarHistory::pos, SCIP_CALL(), GCG_VarHistoryBuffer::vars, and vars.
Referenced by GCGvarhistoryJumpAndRetrieveVars().
◆ GCGvarhistoryCreate()
| SCIP_RETCODE GCGvarhistoryCreate | ( | SCIP * | scip, |
| GCG_VARHISTORY ** | pointer ) |
create a new history pointer to an empty existing buffer and captures it
- Parameters
-
scip SCIP data structure pointer pointer to the history
Definition at line 314 of file gcgvarhistory.c.
References assert(), GCGvarhistoryCreate(), GCG_VarHistoryBuffer::next, GCG_VarHistoryBuffer::nuses, GCG_VarHistoryBuffer::nvars, and SCIP_CALL().
Referenced by GCGvarhistoryCreate(), and SCIP_DECL_PRICERINITSOL().
◆ GCGvarhistoryCopyReference()
| SCIP_RETCODE GCGvarhistoryCopyReference | ( | SCIP * | scip, |
| GCG_VARHISTORY ** | pointer, | ||
| GCG_VARHISTORY * | source ) |
copy a pointer by creating a new one that points to the same buffer at the same position and capture it
- Parameters
-
scip SCIP data structure pointer pointer to the history source source pointer
Definition at line 337 of file gcgvarhistory.c.
References assert(), GCG_VarHistory::buffer, GCG_VARHISTORYBUFFER_SIZE, GCGvarhistoryCaptureBuffer(), GCGvarhistoryCopyReference(), GCG_VarHistoryBuffer::next, GCG_VarHistoryBuffer::nvars, GCG_VarHistory::pos, and SCIP_CALL().
Referenced by GCGcreateConsMasterbranch(), GCGmastersepacutSetVarHistory(), and GCGvarhistoryCopyReference().
◆ GCGvarhistoryFreeReference()
| SCIP_RETCODE GCGvarhistoryFreeReference | ( | SCIP * | scip, |
| GCG_VARHISTORY ** | pointer ) |
release the reference to the buffer and free the history pointer
- Parameters
-
scip SCIP data structure pointer pointer to the history
Definition at line 358 of file gcgvarhistory.c.
References assert(), GCG_VARHISTORYBUFFER_SIZE, GCGvarhistoryFreeReference(), GCGvarhistoryReleaseBuffer(), and SCIP_CALL().
Referenced by freeMastersepacut(), GCGvarhistoryFreeReference(), SCIP_DECL_CONSDELETE(), and SCIP_DECL_PRICEREXITSOL().
◆ GCGvarhistoryAddVar()
| SCIP_RETCODE GCGvarhistoryAddVar | ( | SCIP * | scip, |
| GCG_VARHISTORY * | pointer, | ||
| SCIP_VAR * | var ) |
add variable to history
- Parameters
-
scip SCIP data structure pointer pointer to the history var variable
Definition at line 381 of file gcgvarhistory.c.
References assert(), GCG_VarHistory::buffer, GCG_VARHISTORYBUFFER_SIZE, GCGvarhistoryAddVar(), GCGvarhistoryReleaseBuffer(), GCG_VarHistoryBuffer::next, GCG_VarHistoryBuffer::nuses, GCG_VarHistoryBuffer::nvars, GCG_VarHistory::pos, SCIP_CALL(), SCIPdebugMessage(), var, and GCG_VarHistoryBuffer::vars.
Referenced by GCGvarhistoryAddVar().
◆ GCGvarhistoryCaptureBuffer()
| SCIP_RETCODE GCGvarhistoryCaptureBuffer | ( | GCG_VARHISTORYBUFFER * | buffer | ) |
capture a reference to the history
- Parameters
-
buffer buffer
Definition at line 427 of file gcgvarhistory.c.
References assert(), GCG_VARHISTORYBUFFER_SIZE, GCGvarhistoryCaptureBuffer(), GCG_VarHistoryBuffer::next, GCG_VarHistoryBuffer::nuses, and GCG_VarHistoryBuffer::nvars.
Referenced by GCGvarhistoryCaptureBuffer(), GCGvarhistoryCopyReference(), GCGvarhistoryJumpAndRetrieveVars(), GCGvarhistoryJumpToLatest(), and GCGvarhistoryNext().
◆ GCGvarhistoryReleaseBuffer()
| SCIP_RETCODE GCGvarhistoryReleaseBuffer | ( | SCIP * | scip, |
| GCG_VARHISTORYBUFFER ** | buffer ) |
release a reference to the history
- Parameters
-
scip SCIP data structure buffer buffer
Definition at line 438 of file gcgvarhistory.c.
References assert(), GCG_VARHISTORYBUFFER_SIZE, GCGvarhistoryReleaseBuffer(), historybufferFree(), and SCIP_CALL().
Referenced by GCGvarhistoryAddVar(), GCGvarhistoryFreeReference(), GCGvarhistoryJumpAndRetrieveVars(), GCGvarhistoryJumpToLatest(), GCGvarhistoryNext(), GCGvarhistoryReleaseBuffer(), and historybufferFree().