representativessize;
83 unsigned int* childids,
92 for( i = 0; i < nchildids; i++ )
115assert(comprdata !=
NULL);
117 if( comprdata->representativessize < nrepresentatives )
120comprdata->representativessize = nrepresentatives;
148 unsigned int* leaveids;
160assert(comprdata !=
NULL);
171assert(currentnode !=
NULL);
185 if( nleaveids == 0 )
187 SCIPdebugMsg(
scip,
"-> skip compression (k = %d, nleaves = %d)\n", 1, nleaveids);
199assert(nids == nleaveids);
222 for( k = size-1; k < 1; k++ )
237assert(reoptnode !=
NULL);
240assert(mem_vars >= nvars2 + nafterdualvars);
242nvars[k] = nvars2 + nafterdualvars;
252 SCIPreoptnodeGetConss(reoptnode, conss_var[k], conss_val[k], conss_boundtypes[k], mem_conss, &nconss[k],
254assert(mem_conss == nconss[k]);
257 for( c = 0; c < mem_conss; c++ )
263assert(reoptnode !=
NULL);
265 SCIPdebugMsg(
scip,
"-> use node at id %u, %d vars, %d conss, lowerbound = %.g\n", leaveids[k], nvars[k],
271assert(comprdata->nrepresentatives == 0);
276comprdata->nrepresentatives = (nvars[0] > 0 ? 2 : 1);
277comprdata->nrepresentatives += nconss[0];
281assert(comprdata->nrepresentatives <= comprdata->representativessize);
292assert(pos_repr_fix < comprdata->nrepresentatives);
298 for(
r= pos_repr_fix;
r< comprdata->nrepresentatives;
r++ )
301assert(comprdata->representatives[
r] !=
NULL);
303 for( v = 0; v < nvars[0]; v++ )
313assert(comprdata->representatives[pos_repr_fix-1] !=
NULL);
318assert(0 <= pos_repr_fix && pos_repr_fix < comprdata->nrepresentatives);
321 for( k = 0; k < nconss[0]; k++ )
326assert(pos_repr_fix < comprdata->nrepresentatives);
333 for( v = 0; v < conss_nvars[0][k]; v++ )
340 for(
r= pos_repr_fix + 1;
r< comprdata->nrepresentatives;
r++ )
353 SCIPdebugMsg(
scip,
"-> found representation of size %d.\n", comprdata->nrepresentatives);
356 for( k = size-1; k >= 0; k-- )
393assert(compr !=
NULL);
394assert(comprdata !=
NULL);
398 if( comprdata->nrepresentatives == 0 )
402 for(
r= 0;
r< comprdata->nrepresentatives;
r++ )
423assert(compr !=
NULL);
439assert(compr !=
NULL);
442assert(comprdata !=
NULL);
457assert(compr !=
NULL);
460assert(comprdata !=
NULL);
462 if( comprdata->initialized )
466 for(
r= 0;
r< comprdata->nrepresentatives;
r++ )
471 if( comprdata->representativessize > 0 )
476comprdata->representatives =
NULL;
477comprdata->representativessize = 0;
478comprdata->nrepresentatives = 0;
479comprdata->initialized =
FALSE;
494assert(comprdata !=
NULL);
496 if( !comprdata->initialized )
501comprdata->nrepresentatives = 0;
503comprdata->initialized =
TRUE;
538assert(comprdata !=
NULL);
539comprdata->initialized =
FALSE;
543comprExecWeakcompr, comprdata) );
545assert(compr !=
NULL);
static SCIP_RETCODE constructCompression(SCIP *scip, SCIP_COMPR *compr, SCIP_COMPRDATA *comprdata, SCIP_RESULT *result)
static SCIP_DECL_COMPRFREE(comprFreeWeakcompr)
static SCIP_DECL_COMPRCOPY(comprCopyWeakcompr)
static SCIP_RETCODE sortIDs(SCIP *scip, unsigned int *childids, int nchildids)
static SCIP_DECL_COMPREXIT(comprExitWeakcompr)
static SCIP_DECL_COMPREXEC(comprExecWeakcompr)
SCIP_RETCODE SCIPincludeComprWeakcompr(SCIP *scip)
static SCIP_RETCODE applyCompression(SCIP *scip, SCIP_COMPR *compr, SCIP_COMPRDATA *comprdata, SCIP_RESULT *result)
static SCIP_RETCODE checkMemSize(SCIP *scip, SCIP_COMPRDATA *comprdata, int nrepresentatives)
weakcompr tree compression
#define SCIP_LONGINT_FORMAT
SCIP_STAGE SCIPgetStage(SCIP *scip)
int SCIPgetNIntVars(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
int SCIPgetNBinVars(SCIP *scip)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPsetComprExit(SCIP *scip, SCIP_COMPR *compr, SCIP_DECL_COMPREXIT((*comprexit)))
SCIP_RETCODE SCIPsetComprCopy(SCIP *scip, SCIP_COMPR *compr, SCIP_DECL_COMPRCOPY((*comprcopy)))
SCIP_RETCODE SCIPsetComprFree(SCIP *scip, SCIP_COMPR *compr, SCIP_DECL_COMPRFREE((*comprfree)))
void SCIPcomprSetData(SCIP_COMPR *compr, SCIP_COMPRDATA *comprdata)
SCIP_RETCODE SCIPincludeComprBasic(SCIP *scip, SCIP_COMPR **compr, const char *name, const char *desc, int priority, int minnnodes, SCIP_DECL_COMPREXEC((*comprexec)), SCIP_COMPRDATA *comprdata)
SCIP_COMPRDATA * SCIPcomprGetData(SCIP_COMPR *compr)
SCIP_Bool SCIPcomprIsInitialized(SCIP_COMPR *compr)
const char * SCIPcomprGetName(SCIP_COMPR *compr)
int SCIPcomprGetMinNodes(SCIP_COMPR *compr)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPallocClearMemoryArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
int SCIPnodeGetDepth(SCIP_NODE *node)
int SCIPgetNReoptLeaves(SCIP *scip, SCIP_NODE *node)
SCIP_RETCODE SCIPaddReoptnodeBndchg(SCIP *scip, SCIP_REOPTNODE *reoptnode, SCIP_VAR *var, SCIP_Real bound, SCIP_BOUNDTYPE boundtype)
SCIP_REOPTNODE * SCIPgetReoptnode(SCIP *scip, unsigned int id)
SCIP_RETCODE SCIPinitRepresentation(SCIP *scip, SCIP_REOPTNODE **representatives, int nrepresentatives)
SCIP_RETCODE SCIPdeleteReoptnode(SCIP *scip, SCIP_REOPTNODE **reoptnode)
SCIP_RETCODE SCIPsetReoptCompression(SCIP *scip, SCIP_REOPTNODE **representation, int nrepresentatives, SCIP_Bool *success)
SCIP_RETCODE SCIPgetReoptLeaveIDs(SCIP *scip, SCIP_NODE *node, unsigned int *ids, int idssize, int *nids)
void SCIPgetReoptnodePath(SCIP *scip, SCIP_REOPTNODE *reoptnode, SCIP_VAR **vars, SCIP_Real *vals, SCIP_BOUNDTYPE *boundtypes, int mem, int *nvars, int *nafterdualvars)
SCIP_RETCODE SCIPaddReoptnodeCons(SCIP *scip, SCIP_REOPTNODE *reoptnode, SCIP_VAR **vars, SCIP_Real *vals, SCIP_BOUNDTYPE *boundtypes, SCIP_Real lhs, SCIP_Real rhs, int nvars, REOPT_CONSTYPE constype, SCIP_Bool linear)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
void SCIPsortDownRealInt(SCIP_Real *realarray, int *intarray, int len)
memory allocation routines
public methods for tree compressions
public methods for message output
methods for sorting joint arrays of various types
public methods for reoptimization
SCIP_Real SCIPreoptnodeGetLowerbound(SCIP_REOPTNODE *reoptnode)
void SCIPreoptnodeSetParentID(SCIP_REOPTNODE *reoptnode, unsigned int parentid)
int SCIPreoptnodeGetNConss(SCIP_REOPTNODE *reoptnode)
void SCIPreoptnodeGetConss(SCIP_REOPTNODE *reoptnode, SCIP_VAR ***vars, SCIP_Real **bounds, SCIP_BOUNDTYPE **boundtypes, int mem, int *nconss, int *nvars)
int SCIPreoptnodeGetNVars(SCIP_REOPTNODE *reoptnode)
public methods for branch and bound tree
public methods for compression plugins
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for reoptimization
public methods for the branch-and-bound tree
struct SCIP_ComprData SCIP_COMPRDATA
enum SCIP_BoundType SCIP_BOUNDTYPE
@ REOPT_CONSTYPE_DUALREDS
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4