assert(consdata !=
NULL);
92(*consdata)->consssize = nconss;
93(*consdata)->nconss = nconss;
103 for( c = 0; c < nconss; ++c )
111(*consdata)->conss =
NULL;
112(*consdata)->consssize = 0;
113(*consdata)->nconss = 0;
128assert(consdata !=
NULL);
129assert(*consdata !=
NULL);
132 for( c = 0; c < (*consdata)->nconss; ++c )
152assert(consdata !=
NULL);
156assert(consdata->conss !=
NULL);
157assert(consdata->nconss < consdata->consssize);
160consdata->conss[consdata->nconss] = cons;
189assert(result !=
NULL);
191 for( c = 0; c < nconss; ++c )
194assert(consdata !=
NULL);
197 for( i = 0; i < consdata->nconss; ++i )
208 SCIPdebugMsg(
scip,
"adding constraint <%s> from add conjunction <%s>\n",
243assert(result !=
NULL);
247 for( c = 0; c < nconss && (*result ==
SCIP_FEASIBLE|| completely); ++c )
252assert(consdata !=
NULL);
255 for( i = 0; i < consdata->nconss && subresult ==
SCIP_FEASIBLE; ++i )
270assert( 0 < i && i <= consdata->nconss );
271 SCIPinfoMessage(
scip,
NULL,
"Conjunction constraint %s is violated, at least the sub-constraint %s is violated by this given solution.\n",
292assert(conshdlr !=
NULL);
327 if( sourcedata->nconss > 0 )
329targetdata->consssize = sourcedata->nconss;
330targetdata->nconss = sourcedata->nconss;
332 for( c = 0; c < sourcedata->nconss; ++c )
339targetdata->conss =
NULL;
340targetdata->consssize = 0;
341targetdata->nconss = 0;
415assert(result !=
NULL);
423 for( c = 0; c < nconss; ++c )
426assert(consdata !=
NULL);
429 for( i = 0; i < consdata->nconss; ++i )
441 SCIPdebugMsg(
scip,
"adding constraint <%s> from add conjunction <%s>\n",
450consdata->nconss = 0;
473assert(consdata !=
NULL);
476 for( c = 0; c < consdata->nconss; ++c )
493assert( conshdlr !=
NULL);
494assert( cons !=
NULL);
497assert(consdata !=
NULL);
501 for( i = 0; i < consdata->nconss; ++i )
521 char* nexttokenstart;
525assert(conshdlr !=
NULL);
526assert(cons !=
NULL);
527assert(success !=
NULL);
528assert(str !=
NULL);
529assert(name !=
NULL);
542saveptr = strpbrk(copystr,
"(");
544 if( saveptr ==
NULL)
546 SCIPdebugMsg(
scip,
"error parsing conjunctive constraint: \"%s\"\n", str);
550assert(saveptr !=
NULL);
555nexttokenstart = saveptr;
558saveptr = strpbrk(saveptr,
"(,");
563 if( saveptr !=
NULL)
567 intbracketcounter = 0;
569 if( *saveptr ==
'(')
577 while( bracketcounter > 0 )
579saveptr = strpbrk(saveptr,
"()");
581 if( saveptr !=
NULL)
583 if( *saveptr ==
'(')
592 SCIPdebugMsg(
scip,
"error parsing conjunctive constraint: \"%s\"\n", str);
598saveptr = strpbrk(saveptr,
"(,");
600 while( saveptr !=
NULL&& *saveptr ==
'(');
604 if( saveptr !=
NULL)
606assert(*saveptr ==
',');
609 if( nconss == sconss )
612assert(nconss < sconss);
616assert(nexttokenstart !=
NULL);
617assert(saveptr > nexttokenstart);
621token[saveptr - nexttokenstart] =
'\0';
623 SCIPdebugMsg(
scip,
"conjunctive parsing token(constraint): %s\n", token);
626 SCIP_CALL(
SCIPparseCons(
scip, &(conss[nconss]), token, initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode, success) );
634 SCIPdebugMsg(
scip,
"error parsing conjunctive constraint: \"%s\"\n", str);
640nexttokenstart = saveptr;
642saveptr = strpbrk(saveptr,
"(,");
645 while( saveptr !=
NULL);
649saveptr = strrchr(nexttokenstart,
')');
651 if( saveptr ==
NULL)
653 SCIPdebugMsg(
scip,
"error parsing conjunctive constraint: \"%s\"\n", str);
661 if( nconss == sconss )
667assert(saveptr > nexttokenstart);
671token[saveptr - nexttokenstart] =
'\0';
673 SCIPdebugMsg(
scip,
"conjunctive parsing token(constraint): %s\n", token);
676 SCIP_CALL(
SCIPparseCons(
scip, &(conss[nconss]), token, initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode, success) );
683assert(nconss > 0 || !(*success));
690enforce, check, local, modifiable, dynamic) );
694 for( --nconss; nconss >= 0; --nconss )
720assert(sourcedata !=
NULL);
722sourceconss = sourcedata->conss;
723nconss = sourcedata->nconss;
727assert(sourceconss !=
NULL);
732 for( c = 0; c < nconss && (*valid); ++c )
741assert(!(*valid) || conss[c] !=
NULL);
749enforce, check, local, modifiable, dynamic) );
754enforce, check, local, modifiable, dynamic) );
759 for( c = (*valid ? c - 1 : c - 2); c >= 0; --c )
761assert(conss[c] !=
NULL);
786consEnfolpConjunction, consEnfopsConjunction, consCheckConjunction, consLockConjunction,
789assert(conshdlr !=
NULL);
833 if( conshdlr ==
NULL)
843 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata,
FALSE,
FALSE, enforce, check,
FALSE,
844local, modifiable, dynamic,
FALSE,
FALSE) );
882assert(cons !=
NULL);
883assert(addcons !=
NULL);
892assert(consdata !=
NULL);
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_CHECKPRIORITY
static SCIP_RETCODE checkAllConss(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool completely, SCIP_RESULT *result)
static SCIP_DECL_CONSDELETE(consDeleteConjunction)
static SCIP_RETCODE consdataAddCons(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_CONS *cons)
#define CONSHDLR_MAXPREROUNDS
static SCIP_DECL_CONSPRINT(consPrintConjunction)
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSDATA **consdata, SCIP_CONS **conss, int nconss)
static SCIP_DECL_CONSENFORELAX(consEnforelaxConjunction)
static SCIP_DECL_CONSCOPY(consCopyConjunction)
static SCIP_DECL_CONSLOCK(consLockConjunction)
static SCIP_DECL_CONSENFOPS(consEnfopsConjunction)
static SCIP_DECL_CONSTRANS(consTransConjunction)
#define CONSHDLR_PRESOLTIMING
static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata)
static SCIP_DECL_CONSPARSE(consParseConjunction)
#define CONSHDLR_EAGERFREQ
static SCIP_DECL_CONSCHECK(consCheckConjunction)
#define CONSHDLR_ENFOPRIORITY
static SCIP_DECL_CONSHDLRCOPY(conshdlrCopyConjunction)
static SCIP_DECL_CONSPRESOL(consPresolConjunction)
static SCIP_RETCODE addAllConss(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_RESULT *result)
static SCIP_DECL_CONSENFOLP(consEnfolpConjunction)
constraint handler for conjunction constraints
SCIP_RETCODE SCIPcreateConsConjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic)
SCIP_RETCODE SCIPaddConsElemConjunction(SCIP *scip, SCIP_CONS *cons, SCIP_CONS *addcons)
SCIP_RETCODE SCIPcreateConsBasicConjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nconss, SCIP_CONS **conss)
SCIP_RETCODE SCIPincludeConshdlrConjunction(SCIP *scip)
SCIP_RETCODE SCIPgetConsCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_CONS *sourcecons, SCIP_CONS **targetcons, SCIP_CONSHDLR *sourceconshdlr, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *name, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool global, SCIP_Bool *valid)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConsLocal(SCIP *scip, SCIP_CONS *cons, SCIP_NODE *validnode)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRINT((*consprint)))
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
SCIP_RETCODE SCIPcheckCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_RESULT *result)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
SCIP_RETCODE SCIPtransformConss(SCIP *scip, int nconss, SCIP_CONS **conss, SCIP_CONS **transconss)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConsLocksType(SCIP *scip, SCIP_CONS *cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPparseCons(SCIP *scip, SCIP_CONS **cons, const char *str, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool *success)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPtransformCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
SCIP_RETCODE SCIPsetConsChecked(SCIP *scip, SCIP_CONS *cons, SCIP_Bool check)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_RETCODE SCIPcaptureCons(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
#define SCIPensureBlockMemoryArray(scip, ptr, arraysizeptr, minsize)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
void SCIPupdateSolConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
memory allocation routines
public methods for managing constraints
public methods for message output
public methods for constraint handler plugins and constraints
public methods for problem copies
public methods for memory management
public methods for message handling
public methods for global and local (sub)problems
public methods for solutions
struct SCIP_ConsData SCIP_CONSDATA
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