A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://scip.zib.de/doc/html/cons__countsols_8c_source.php below:

SCIP Doxygen Documentation: cons_countsols.c Source File

85#define CONSHDLR_NAME "countsols" 86#define CONSHDLR_DESC "constraint to count feasible solutions" 87#define CONSHDLR_ENFOPRIORITY -9999999 88#define CONSHDLR_CHECKPRIORITY -9999999 89#define CONSHDLR_EAGERFREQ 100 91#define CONSHDLR_NEEDSCONS FALSE 94#define DEFAULT_SPARSETEST TRUE 95#define DEFAULT_DISCARDSOLS TRUE 96#define DEFAULT_ACTIVE FALSE 97#define DEFAULT_COLLECT FALSE 98#define DEFAULT_SOLLIMIT -1LL 101#define DISP_SOLS_NAME "sols" 102#define DISP_SOLS_DESC "number of detected feasible solutions" 103#define DISP_SOLS_HEADER " sols " 104#define DISP_SOLS_WIDTH 7 105#define DISP_SOLS_PRIORITY 110000 106#define DISP_SOLS_POSITION 100000 107#define DISP_SOLS_STRIPLINE TRUE 109#define DISP_CUTS_NAME "feasST" 110#define DISP_CUTS_DESC "number of detected non trivial feasible subtrees" 111#define DISP_CUTS_HEADER "feasST" 112#define DISP_CUTS_WIDTH 6 113#define DISP_CUTS_PRIORITY 110000 114#define DISP_CUTS_POSITION 110000 115#define DISP_CUTS_STRIPLINE TRUE 124#define CUTOFF_CONSTRAINT(x) SCIP_RETCODE x (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLRDATA* conshdlrdata) 128struct

SCIP_ConshdlrData

182

assert(newvalue < LONG_MAX);

185

mpz_set_si(*value, (

long

) newvalue);

199

assert(0 <= exponent && exponent < LONG_MAX);

202

mpz_ui_pow_ui(*value, 2UL, (

unsigned long

) exponent);

204

assert(exponent < 64);

229

mpz_add_ui(*value, *value, 1UL);

244

mpz_add(*value, *value, *summand);

246

(*value) += (*summand);

258

assert(0 <= factor && factor < LONG_MAX);

261

mpz_mul_ui(*value, *value, (

unsigned long

) factor);

277

(void) mpz_get_str(*buffer, 10, value);

293 if

( 0 != mpz_fits_sint_p(value) )

296 return

mpz_get_si(value);

315

assert( var !=

NULL

);

332

(*conshdlrdata)->feasST = 0;

333

(*conshdlrdata)->nDiscardSols = 0;

334

(*conshdlrdata)->nNonSparseSols = 0;

335

(*conshdlrdata)->solutions =

NULL

;

336

(*conshdlrdata)->nsolutions = 0;

337

(*conshdlrdata)->ssolutions = 0;

341

(*conshdlrdata)->cutoffSolution =

NULL

;

342

(*conshdlrdata)->warning =

FALSE

;

343

(*conshdlrdata)->hashmap =

NULL

;

344

(*conshdlrdata)->allvars =

NULL

;

345

(*conshdlrdata)->vars =

NULL

;

346

(*conshdlrdata)->nallvars = 0;

347

(*conshdlrdata)->nvars = 0;

348

(*conshdlrdata)->continuous =

FALSE

;

367

conshdlrdata->active =

FALSE

;

369 SCIPdebugMsg

(

scip

,

"check solution in original space before counting\n"

);

385

conshdlrdata->active =

TRUE

;

388#define checkSolutionOrig(scip, sol, conshdlrdata) 411 for

(

h

= 0;

h

< nheuristics && valid; ++

h

)

420 "At least one heuristic is not turned off! Heuristic solutions are currently not accepted while couting.\n"

);

471

assert( sol !=

NULL

);

472

assert( conshdlrdata !=

NULL

);

474

vars = conshdlrdata->vars;

475

nvars = conshdlrdata->nvars;

480 for

( v = 0; v < nvars; ++v )

484

assert( var !=

NULL

);

533

assert( sol !=

NULL

);

534

assert( conshdlrdata !=

NULL

);

536

vars = conshdlrdata->vars;

537

nvars = conshdlrdata->nvars;

539

nconsvars = nvars * 2;

549 for

( v = nvars - 1; v >= 0; --v )

564

bounds[nconsvars] = 1;

569

bounds[nconsvars] = 0;

589

bounds[nconsvars] = lb + 1.0;

594

bounds[nconsvars] = ub - 1.0;

599

bounds[nconsvars] = valueInt + 1.0;

600

consvars[nconsvars] = var;

603

bounds[nconsvars] = valueInt - 1.0;

607

consvars[nconsvars] = var;

614 if

( nvars == nbinvars )

616 for

( v = nbinvars - 1; v >= 0; --v )

631

nconsvars, consvars, boundtypes, bounds,

666 if

( conshdlrdata->nsolutions == conshdlrdata->ssolutions )

668 if

( conshdlrdata->ssolutions == 0 )

670

conshdlrdata->ssolutions = 100;

675

assert( conshdlrdata->ssolutions < INT_MAX / 2);

676

conshdlrdata->ssolutions *= 2;

680

assert( conshdlrdata->nsolutions < conshdlrdata->ssolutions );

683

nvars = conshdlrdata->nvars;

685 SCIPdebugMsg

(

scip

,

"creating solution number %d\n"

, conshdlrdata->nsolutions);

689

assert(solution !=

NULL

);

693

assert(ubvalues !=

NULL

);

694

assert(lbvalues !=

NULL

);

696 for

( v = nvars - 1; v >= 0; --v )

700

var = conshdlrdata->vars[v];

701

assert(var !=

NULL

);

711

ubvalues[v] = lbvalues[v];

718

conshdlrdata->solutions[conshdlrdata->nsolutions] = solution;

719

conshdlrdata->nsolutions++;

736

assert( sol !=

NULL

);

737

assert( conshdlrdata !=

NULL

);

738

assert( result !=

NULL

);

755 SCIPdebugMsg

(

scip

,

"counts number of solutions represented through the given one\n"

);

785 for

( v = 0; v < nvars; ++v )

815

conshdlrdata->feasST++;

817 if

( conshdlrdata->collect )

822 addInt

(&conshdlrdata->nsols, &newsols);

825 else if

(!conshdlrdata->discardsols)

827 SCIP_CALL

( conshdlrdata->cutoffSolution(

scip

, sol, conshdlrdata) );

828 addOne

(&conshdlrdata->nsols);

829

conshdlrdata->nNonSparseSols++;

830 if

( conshdlrdata->collect )

836

conshdlrdata->nDiscardSols++;

866

assert( conshdlr !=

NULL

);

871

assert( conss !=

NULL

);

873

(*satisfied) =

TRUE

;

876 for

( ; c >= 0 && nconss > 0 && (*satisfied); --c )

890 for

( v = 0; v < nvars && !fixedone; ++v )

902

(*satisfied) =

FALSE

;

941

assert( conshdlr !=

NULL

);

946

assert( conss !=

NULL

);

948

(*satisfied) =

TRUE

;

951 for

( ; c >= 0 && nconss > 0 && (*satisfied); --c )

967

capa = capacity + 0.1;

969 for

( v = nvars - 1; v >= 0 && capa >= 0 ; --v )

976

assert( weights[v] >= 0);

985 else if

( weights[v] >= 1 )

998

(*satisfied) =

FALSE

;

1034

assert( conshdlr !=

NULL

);

1039

assert( conss !=

NULL

);

1041

(*satisfied) =

TRUE

;

1044 for

( ; c >= 0 && nconss > 0 && (*satisfied); --c )

1050

satisfiedbound =

FALSE

;

1058 for

( v = nvars-1; v >= 0 && !satisfiedbound; --v )

1072 if

( !satisfiedbound )

1076

(*satisfied) =

FALSE

;

1113

assert( conshdlr !=

NULL

);

1118

assert( conss !=

NULL

);

1120

(*satisfied) =

TRUE

;

1123 for

( ; c >= 0 && nconss > 0 && (*satisfied); --c )

1151

(*satisfied) =

FALSE

;

1183

assert( sol !=

NULL

);

1184

assert( feasible !=

NULL

);

1192

assert(conshdlrs !=

NULL

);

1195 for

(

h

= nconshdlrs ;

h

>= 0 ; --

h

)

1197

conshdlr = conshdlrs[

h

];

1198

assert( conshdlr !=

NULL

);

1210 SCIPdebugMsg

(

scip

,

"constraint handler %s has %d active constraint(s)\n"

,

1236 SCIPdebugMsg

(

scip

,

"a <bounddisjunction> constraint cannot be disabled\n"

);

1251 SCIPdebugMsg

(

scip

,

"sparse solution is infeasible since the following constraint (and maybe more) is(/are) enabled\n"

);

1281

assert( sol !=

NULL

);

1282

assert( conshdlrdata !=

NULL

);

1283

assert( result !=

NULL

);

1312 for

( v = 0; v < nvars; ++v )

1315 SCIPdebugMsg

(

scip

,

"variables <%s> Local Bounds are [%g,%g] Global Bounds are [%g,%g]\n"

,

1327 addOne

(&conshdlrdata->nsols);

1328

conshdlrdata->nNonSparseSols++;

1332 if

( conshdlrdata->collect )

1340 if

( conshdlrdata->continuous )

1342 SCIP_CALL

( conshdlrdata->cutoffSolution(

scip

, sol, conshdlrdata) );

1348 else if

( conshdlrdata->sparsetest )

1358 if

( conshdlrdata->sollimit > -1 && (!valid || conshdlrdata->sollimit <= nsols) )

1387

assert(conshdlrdata !=

NULL

);

1390 if

( conshdlrdata->active )

1395

assert(conshdlr !=

NULL

);

1407#define consCopyCountsols NULL 1415

assert(conshdlr !=

NULL

);

1420

assert(conshdlrdata !=

NULL

);

1423 freeInt

(&conshdlrdata->nsols);

1425

assert( conshdlrdata->solutions ==

NULL

);

1426

assert( conshdlrdata->nsolutions == 0 );

1427

assert( conshdlrdata->ssolutions == 0 );

1441

assert( conshdlr !=

NULL

);

1445

assert(conshdlrdata !=

NULL

);

1448

conshdlrdata->feasST = 0;

1449

conshdlrdata->nDiscardSols = 0;

1450

conshdlrdata->nNonSparseSols = 0;

1451 setInt

(&conshdlrdata->nsols, 0LL);

1453

conshdlrdata->solutions =

NULL

;

1454

conshdlrdata->nsolutions = 0;

1455

conshdlrdata->ssolutions = 0;

1457 if

( conshdlrdata->active )

1475 for

( v = 0; v < norigvars; ++v )

1479

assert(nallvars < conshdlrdata->nallvars);

1482

assert(conshdlrdata->allvars[nallvars] !=

NULL

);

1487 if

( strncmp(

SCIPvarGetName

(conshdlrdata->allvars[nallvars]),

"t_andresultant_"

, strlen(

"t_andresultant_"

)) != 0 )

1496

assert(nallvars == conshdlrdata->nallvars);

1513

assert( conshdlr !=

NULL

);

1517

assert(conshdlrdata !=

NULL

);

1520 for

( v = conshdlrdata->nvars - 1; v >= 0; --v )

1525 if

( conshdlrdata->hashmap !=

NULL

)

1533

conshdlrdata->nvars = 0;

1535 if

( conshdlrdata->allvars !=

NULL

)

1538 for

( v = 0; v < conshdlrdata->nallvars; ++v )

1540 if

( strncmp(

SCIPvarGetName

(conshdlrdata->allvars[v]),

"t_andresultant_"

, strlen(

"t_andresultant_"

)) != 0 )

1550

conshdlrdata->nallvars = 0;

1553 if

( conshdlrdata->nsolutions > 0 )

1555 for

( s = conshdlrdata->nsolutions - 1; s >= 0 ; --s )

1561

conshdlrdata->nsolutions = 0;

1562

conshdlrdata->ssolutions = 0;

1564

assert( conshdlrdata->solutions ==

NULL

);

1566

conshdlrdata->continuous =

FALSE

;

1568

assert( conshdlrdata->solutions ==

NULL

);

1569

assert( conshdlrdata->nsolutions == 0 );

1570

assert( conshdlrdata->ssolutions == 0 );

1586

assert( conshdlr !=

NULL

);

1590

assert(conshdlrdata !=

NULL

);

1597

assert(conshdlrdata->nsolutions == 0);

1598

assert(conshdlrdata->solutions ==

NULL

);

1604 for

( v = conshdlrdata->nvars - 1; v >= 0; --v )

1618

conshdlrdata->nvars = v + 1;

1624 for

( v = conshdlrdata->nvars - 1; v >= 0; --v )

1648 for

( v = conshdlrdata->nvars - 1; v >= 0; --v )

1657

conshdlrdata->cutoffSolution = addBinaryCons;

1659

conshdlrdata->cutoffSolution = addIntegerCons;

1672

assert(conshdlr !=

NULL

);

1673

assert(nconss == 0);

1677

assert(conshdlrdata !=

NULL

);

1679 if

( conshdlrdata->active && restart )

1681 SCIPerrorMessage

(

"When collecting and counting solutions restarts need to be disabled (presolving/maxrestarts = 0).\n"

);

1695 SCIPdebugMsg

(

scip

,

"method SCIP_DECL_CONSENFOLP(consEnfolpCountsols)\n"

);

1698

assert( conshdlr !=

NULL

);

1699

assert( nconss == 0 );

1702

assert( conshdlrdata !=

NULL

);

1704 if

( conshdlrdata->active )

1706 if

( !solinfeasible )

1732 SCIPdebugMsg

(

scip

,

"method SCIP_DECL_CONSENFORELAX(consEnfolpCountsols)\n"

);

1735

assert( conshdlr !=

NULL

);

1736

assert( nconss == 0 );

1739

assert( conshdlrdata !=

NULL

);

1741 if

( conshdlrdata->active )

1743 if

( !solinfeasible )

1764 SCIPdebugMsg

(

scip

,

"method SCIP_DECL_CONSENFOPS(consEnfopsCountsols)\n"

);

1767

assert( conshdlr !=

NULL

);

1768

assert( nconss == 0 );

1771

assert( conshdlrdata !=

NULL

);

1773 if

( conshdlrdata->active )

1775 if

( !solinfeasible )

1804 SCIPdebugMsg

(

scip

,

"method SCIP_DECL_CONSCHECK(consCheckCountsols)\n"

);

1807

assert( conshdlrdata !=

NULL

);

1809 if

( conshdlrdata->active )

1814 else if

( !conshdlrdata->warning )

1816 SCIPwarningMessage

(

scip

,

"a non-trivial solution comes in over <SCIP_DECL_CONSCHECK(consCheckCountsols)>; currently these solutions are ignored.\n"

);

1817

conshdlrdata->warning =

TRUE

;

1849 if

( usesymmetry != 0 )

1851 int

symcomptiming = 2;

1858 else if

( usesymmetry == 2 )

1866 SCIPerrorMessage

(

"Symmetry handling and solution counting are not compatible. "

\

1867 "You might want to disable symmetry by setting parameter <misc/usesymmetry> to 0.\n"

);

1872 SCIPwarningMessage

(

scip

,

"Symmetry handling has been deactivated since it is not compatible with counting.\n"

);

1942 int

displayprimalbound;

1954 if

( nrestarts != 0 )

1969 if

( usesymmetry != 0 )

1971 int

symcomptiming = 2;

1978 else if

( usesymmetry == 2 )

1986 SCIPerrorMessage

(

"Symmetry handling and solution counting are not compatible. "

\

1987 "You might want to disable symmetry by setting parameter <misc/usesymmetry> to 0.\n"

);

1992 SCIPwarningMessage

(

scip

,

"Symmetry handling has been deactivated since it is not compatible with counting.\n"

);

2028 "Problem contains continuous variables (after presolving). Counting projection to integral variables!\n"

);

2033 if

( displayprimalbound != 0 )

2038 if

( displaygap != 0 )

2045 if

( displayprimalbound != 2 )

2050 if

( displayprimalbound != 2 )

2074 if

( requiredsize > buffersize )

2080

assert( buffersize >= requiredsize );

2091 if

( displayprimalbound != 0 )

2095 if

( displaygap != 0 )

2101 if

( displaysols != 2 )

2105 if

( displayfeasST != 2 )

2152

assert(var1 !=

NULL

);

2153

assert(var2 !=

NULL

);

2191

assert(file !=

NULL

);

2192

assert(hashmap !=

NULL

);

2193

assert(allvars !=

NULL

|| nallvars == 0);

2194

assert(activevars !=

NULL

|| nactivevars == 0);

2195

assert(sols !=

NULL

|| nsols == 0);

2205 for

( s = 0; s < nsols; ++s )

2207

sparsesol = sols[s];

2208

assert(sparsesol !=

NULL

);

2226 for

( v = 0; v < nallvars; ++v )

2235

vars[0] = allvars[v];

2241

assert(requiredsize <= nallvars);

2242

assert(nvars <= nactivevars);

2244

realvalue = constant;

2246 for

( i = 0; i < nvars; ++i )

2250

assert(0 <= idx && idx < nactivevars);

2251

assert(activevars[idx] == vars[i]);

2254

realvalue +=

scalars

[i] * sol[idx];

2321

assert( conshdlr !=

NULL

);

2324

assert( conshdlrdata !=

NULL

);

2326

nsparsesols = conshdlrdata->nsolutions;

2340 if

( requiredsize > buffersize )

2342

buffersize = requiredsize;

2347

assert( buffersize >= requiredsize );

2352 else if

( nsols == 0 )

2356 else if

( nsparsesols == 0 )

2358 SCIPdialogMessage

(

scip

,

NULL

,

"there is no solution collect (set parameter <constraints/countsols/collect> to TRUE)\n"

);

2369

*nextdialog =

NULL

;

2375 if

( filename[0] !=

'\0'

)

2377

file = fopen(filename,

"w"

);

2396

nvars = conshdlrdata->nvars;

2397

sparsesols = conshdlrdata->solutions;

2417

assert(norigvars == conshdlrdata->nallvars);

2427 SCIPsortDownPtrPtr

((

void

**)allvars, (

void

**)origvars, varCompProbindex, norigvars);

2434 for

( v = 0; v < norigvars; ++v )

2441

assert(transvar !=

NULL

);

2442

assert(transvar == allvars[v]);

2451

retcode =

writeExpandedSolutions

(

scip

, file, allvars, conshdlrdata->nallvars, conshdlrdata->vars, nvars, conshdlrdata->hashmap, sparsesols, nsparsesols);

2501 "count"

,

"count number of feasible solutions"

,

FALSE

,

NULL

) );

2510 "countpresolve"

,

"presolve instance before counting number of feasible solutions"

,

FALSE

,

NULL

) );

2521

assert(submenu !=

NULL

);

2527 "allsolutions"

,

"write all counted primal solutions to file"

,

FALSE

,

NULL

) );

2549

assert(disp !=

NULL

);

2555

assert( conshdlr !=

NULL

);

2582

assert(disp !=

NULL

);

2588

assert( conshdlr !=

NULL

);

2614 char

gmpversion[20];

2623

consEnfolpCountsols, consEnfopsCountsols, consCheckCountsols, consLockCountsols,

2626

assert(conshdlr !=

NULL

);

2640 "is the constraint handler active?"

,

2644 "should the sparse solution test be turned on?"

,

2648 "is it allowed to discard solutions?"

,

2652 "should the solutions be collected?"

,

2656 "counting stops, if the given number of solutions were found (-1: no limit)"

,

2676

(void)

SCIPsnprintf

(gmpversion, (

int

)

sizeof

(gmpversion),

"MPIR %s"

, mpir_version);

2680

(void)

SCIPsnprintf

(gmpversion, (

int

)

sizeof

(gmpversion),

"GMP %s"

, gmp_version);

2743

assert( conshdlr !=

NULL

);

2746

assert( conshdlrdata !=

NULL

);

2765

assert( conshdlr !=

NULL

);

2768

assert( conshdlrdata !=

NULL

);

2774

assert(0 <= (

int

) (mpz_sizeinbase( conshdlrdata->nsols, 10 ) + 2));

2775

*requiredsize = (int) (mpz_sizeinbase( conshdlrdata->nsols, 10 ) + 2);

2776 if

( *requiredsize <= buffersize)

2777 toString

(conshdlrdata->nsols, buffer, buffersize);

2779 if

( conshdlrdata->nsols < pow(10.0, (

double

)buffersize) )

2781 toString

(conshdlrdata->nsols, buffer, buffersize);

2782

*requiredsize = (int)strlen(*buffer);

2802

assert( conshdlr !=

NULL

);

2805

assert( conshdlrdata !=

NULL

);

2807 return

conshdlrdata->feasST;

2834

assert( conshdlr !=

NULL

);

2837

assert( conshdlrdata !=

NULL

);

2839

*vars = conshdlrdata->vars;

2840

*nvars = conshdlrdata->nvars;

2841

*sols = conshdlrdata->solutions;

2842

*nsols = conshdlrdata->nsolutions;

static GRAPHNODE ** active

constraint handler for bound disjunction constraints

#define DISP_SOLS_STRIPLINE

static SCIP_DECL_CONSEXITSOL(consExitsolCountsols)

static SCIP_Longint getNCountedSols(Int value, SCIP_Bool *valid)

static SCIP_DECL_SORTPTRCOMP(varCompProbindex)

#define CONSHDLR_NEEDSCONS

static SCIP_RETCODE createCountDialog(SCIP *scip)

static SCIP_DECL_DISPOUTPUT(dispOutputSols)

#define DEFAULT_DISCARDSOLS

#define CONSHDLR_CHECKPRIORITY

static void toString(Int value, char **buffer, int buffersize)

#define DISP_SOLS_PRIORITY

static SCIP_RETCODE checkFeasSubtree(SCIP *scip, SCIP_SOL *sol, SCIP_Bool *feasible)

#define DISP_CUTS_POSITION

static SCIP_DECL_CONSINITSOL(consInitsolCountsols)

static SCIP_RETCODE writeExpandedSolutions(SCIP *scip, FILE *file, SCIP_VAR **allvars, int nallvars, SCIP_VAR **activevars, int nactivevars, SCIP_HASHMAP *hashmap, SCIP_SPARSESOL **sols, int nsols)

static SCIP_RETCODE checkLogicor(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_Bool *satisfied)

static SCIP_DECL_CONSENFOPS(consEnfopsCountsols)

static SCIP_DECL_CONSFREE(consFreeCountsols)

static void multInt(Int *value, SCIP_Longint factor)

static SCIP_DECL_CONSEXIT(consExitCountsols)

static void addInt(Int *value, Int *summand)

static SCIP_RETCODE checkSolution(SCIP *scip, SCIP_SOL *sol, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_RESULT *result)

#define CUTOFF_CONSTRAINT(x)

static SCIP_RETCODE collectSolution(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_SOL *sol)

#define DEFAULT_SPARSETEST

static void setInt(Int *value, SCIP_Longint newvalue)

static SCIP_RETCODE checkParameters(SCIP *scip)

static SCIP_DECL_CONSLOCK(consLockCountsols)

static void checkSolutionOrig(SCIP *scip, SCIP_SOL *sol, SCIP_CONSHDLRDATA *conshdlrdata)

static SCIP_DECL_CONSHDLRCOPY(conshdlrCopyCountsols)

static void allocInt(Int *value)

#define DISP_CUTS_PRIORITY

static void addOne(Int *value)

static void freeInt(Int *value)

static SCIP_RETCODE checkVarbound(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_Bool *satisfied)

#define DISP_CUTS_STRIPLINE

static SCIP_DECL_CONSENFORELAX(consEnforelaxCountsols)

static SCIP_RETCODE conshdlrdataCreate(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)

static void setPowerOfTwo(Int *value, SCIP_Longint exponent)

static SCIP_RETCODE includeConshdlrCountsols(SCIP *scip, SCIP_Bool dialogs)

#define CONSHDLR_EAGERFREQ

static SCIP_Bool varIsUnfixedLocal(SCIP_VAR *var)

static SCIP_DECL_CONSINIT(consInitCountsols)

static SCIP_DECL_CONSCHECK(consCheckCountsols)

static SCIP_DECL_CONSENFOLP(consEnfolpCountsols)

static SCIP_RETCODE checkBounddisjunction(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_Bool *satisfied)

#define CONSHDLR_ENFOPRIORITY

static SCIP_RETCODE checkKnapsack(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_Bool *satisfied)

#define consCopyCountsols

static SCIP_RETCODE countSparseSol(SCIP *scip, SCIP_SOL *sol, SCIP_Bool feasible, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_RESULT *result)

#define DISP_SOLS_POSITION

Constraint handler for counting feasible solutions.

Constraint handler for knapsack constraints of the form , x binary and .

Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...

Constraint handler for the set partitioning / packing / covering constraints .

Constraint handler for variable bound constraints .

#define SCIP_LONGINT_FORMAT

#define SCIP_CALL_FINALLY(x, y)

default user interface dialog

int SCIPgetNVarsKnapsack(SCIP *scip, SCIP_CONS *cons)

SCIP_Real SCIPgetVbdcoefVarbound(SCIP *scip, SCIP_CONS *cons)

int SCIPgetNVarsLogicor(SCIP *scip, SCIP_CONS *cons)

SCIP_Real * SCIPgetBoundsBounddisjunction(SCIP *scip, SCIP_CONS *cons)

void SCIPgetNCountedSolsstr(SCIP *scip, char **buffer, int buffersize, int *requiredsize)

SCIP_RETCODE SCIPcreateConsBounddisjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds, 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)

int SCIPgetNVarsBounddisjunction(SCIP *scip, SCIP_CONS *cons)

SCIP_VAR * SCIPgetVbdvarVarbound(SCIP *scip, SCIP_CONS *cons)

SCIP_BOUNDTYPE * SCIPgetBoundtypesBounddisjunction(SCIP *scip, SCIP_CONS *cons)

SCIP_VAR * SCIPgetVarVarbound(SCIP *scip, SCIP_CONS *cons)

SCIP_Longint SCIPgetNCountedSols(SCIP *scip, SCIP_Bool *valid)

SCIP_Longint * SCIPgetWeightsKnapsack(SCIP *scip, SCIP_CONS *cons)

SCIP_Longint SCIPgetCapacityKnapsack(SCIP *scip, SCIP_CONS *cons)

SCIP_Real SCIPgetLhsVarbound(SCIP *scip, SCIP_CONS *cons)

SCIP_Longint SCIPgetNCountedFeasSubtrees(SCIP *scip)

SCIP_VAR ** SCIPgetVarsLogicor(SCIP *scip, SCIP_CONS *cons)

SCIP_Real SCIPgetRhsVarbound(SCIP *scip, SCIP_CONS *cons)

SCIP_VAR ** SCIPgetVarsKnapsack(SCIP *scip, SCIP_CONS *cons)

SCIP_RETCODE SCIPcreateConsSetcover(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, 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_RETCODE SCIPsetParamsCountsols(SCIP *scip)

SCIP_DECL_DIALOGEXEC(SCIPdialogExecCountPresolve)

SCIP_VAR ** SCIPgetVarsBounddisjunction(SCIP *scip, SCIP_CONS *cons)

SCIP_RETCODE SCIPcount(SCIP *scip)

void SCIPgetCountedSparseSols(SCIP *scip, SCIP_VAR ***vars, int *nvars, SCIP_SPARSESOL ***sols, int *nsols)

SCIP_RETCODE SCIPincludeConshdlrCountsols(SCIP *scip)

SCIP_STAGE SCIPgetStage(SCIP *scip)

int SCIPgetNContVars(SCIP *scip)

SCIP_VAR ** SCIPgetOrigVars(SCIP *scip)

int SCIPgetNVars(SCIP *scip)

SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)

SCIP_VAR ** SCIPgetVars(SCIP *scip)

int SCIPgetNOrigVars(SCIP *scip)

int SCIPgetNBinVars(SCIP *scip)

void SCIPhashmapFree(SCIP_HASHMAP **hashmap)

int SCIPhashmapGetImageInt(SCIP_HASHMAP *hashmap, void *origin)

SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)

SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)

SCIP_RETCODE SCIPhashmapInsertInt(SCIP_HASHMAP *hashmap, void *origin, int image)

SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)

void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)

void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)

SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)

void SCIPdialogMessage(SCIP *scip, FILE *file, const char *formatstr,...)

void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)

void SCIPprintError(SCIP_RETCODE retcode)

SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)

SCIP_RETCODE SCIPaddLongintParam(SCIP *scip, const char *name, const char *desc, SCIP_Longint *valueptr, SCIP_Bool isadvanced, SCIP_Longint defaultvalue, SCIP_Longint minvalue, SCIP_Longint maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)

SCIP_Bool SCIPisParamFixed(SCIP *scip, const char *name)

SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)

SCIP_RETCODE SCIPunfixParam(SCIP *scip, const char *name)

SCIP_RETCODE SCIPsetEmphasis(SCIP *scip, SCIP_PARAMEMPHASIS paramemphasis, SCIP_Bool quiet)

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 SCIPgetIntParam(SCIP *scip, const char *name, int *value)

SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)

SCIP_RETCODE SCIPgetPseudoBranchCands(SCIP *scip, SCIP_VAR ***pseudocands, int *npseudocands, int *npriopseudocands)

int SCIPgetNPseudoBranchCands(SCIP *scip)

void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)

SCIP_RETCODE SCIPsetConshdlrInit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINIT((*consinit)))

int SCIPgetNConshdlrs(SCIP *scip)

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 SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))

SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))

int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)

const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)

SCIP_RETCODE SCIPsetConshdlrExit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXIT((*consexit)))

int SCIPconshdlrGetNEnabledConss(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 SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))

SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITSOL((*consinitsol)))

SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)

int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)

SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)

SCIP_CONSHDLR ** SCIPgetConshdlrs(SCIP *scip)

SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)

const char * SCIPconsGetName(SCIP_CONS *cons)

SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)

void SCIPdialoghdlrClearBuffer(SCIP_DIALOGHDLR *dialoghdlr)

SCIP_RETCODE SCIPreleaseDialog(SCIP *scip, SCIP_DIALOG **dialog)

SCIP_DIALOG * SCIPdialoghdlrGetRoot(SCIP_DIALOGHDLR *dialoghdlr)

SCIP_Bool SCIPdialogHasEntry(SCIP_DIALOG *dialog, const char *entryname)

SCIP_RETCODE SCIPdialoghdlrAddHistory(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *command, SCIP_Bool escapecommand)

SCIP_RETCODE SCIPincludeDialog(SCIP *scip, SCIP_DIALOG **dialog, SCIP_DECL_DIALOGCOPY((*dialogcopy)), SCIP_DECL_DIALOGEXEC((*dialogexec)), SCIP_DECL_DIALOGDESC((*dialogdesc)), SCIP_DECL_DIALOGFREE((*dialogfree)), const char *name, const char *desc, SCIP_Bool issubmenu, SCIP_DIALOGDATA *dialogdata)

SCIP_RETCODE SCIPaddDialogEntry(SCIP *scip, SCIP_DIALOG *dialog, SCIP_DIALOG *subdialog)

SCIP_RETCODE SCIPdialoghdlrGetWord(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *prompt, char **inputword, SCIP_Bool *endoffile)

SCIP_DIALOG * SCIPgetRootDialog(SCIP *scip)

int SCIPdialogFindEntry(SCIP_DIALOG *dialog, const char *entryname, SCIP_DIALOG **subdialog)

void SCIPdispLongint(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, SCIP_Longint val, int width)

const char * SCIPdispGetName(SCIP_DISP *disp)

SCIP_RETCODE SCIPincludeDisp(SCIP *scip, const char *name, const char *desc, const char *header, SCIP_DISPSTATUS dispstatus, SCIP_DECL_DISPCOPY((*dispcopy)), SCIP_DECL_DISPFREE((*dispfree)), SCIP_DECL_DISPINIT((*dispinit)), SCIP_DECL_DISPEXIT((*dispexit)), SCIP_DECL_DISPINITSOL((*dispinitsol)), SCIP_DECL_DISPEXITSOL((*dispexitsol)), SCIP_DECL_DISPOUTPUT((*dispoutput)), SCIP_DISPDATA *dispdata, int width, int priority, int position, SCIP_Bool stripline)

SCIP_RETCODE SCIPincludeExternalCodeInformation(SCIP *scip, const char *name, const char *description)

SCIP_HEUR ** SCIPgetHeurs(SCIP *scip)

int SCIPgetNHeurs(SCIP *scip)

int SCIPheurGetFreq(SCIP_HEUR *heur)

#define SCIPfreeMemoryArrayNull(scip, ptr)

#define SCIPreallocMemoryArray(scip, ptr, newnum)

#define SCIPallocMemoryArray(scip, ptr, 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)

SCIP_RETCODE SCIPcheckSolOrig(SCIP *scip, SCIP_SOL *sol, SCIP_Bool *feasible, SCIP_Bool printreason, SCIP_Bool completely)

SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)

SCIP_HEUR * SCIPsolGetHeur(SCIP_SOL *sol)

SCIP_RETCODE SCIPcreateLPSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)

SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)

SCIP_Real SCIPretransformObj(SCIP *scip, SCIP_Real obj)

SCIP_RETCODE SCIPcreatePseudoSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)

SCIP_RETCODE SCIPpresolve(SCIP *scip)

SCIP_RETCODE SCIPinterruptSolve(SCIP *scip)

SCIP_RETCODE SCIPsolve(SCIP *scip)

SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)

SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)

SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)

SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)

SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)

SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)

SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)

SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)

SCIP_Longint SCIPconvertRealToLongint(SCIP *scip, SCIP_Real real)

SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)

SCIP_RETCODE SCIPvarGetOrigvarSum(SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)

SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)

SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)

SCIP_Real SCIPvarGetObj(SCIP_VAR *var)

SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)

SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)

SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)

int SCIPvarGetProbindex(SCIP_VAR *var)

const char * SCIPvarGetName(SCIP_VAR *var)

SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)

SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)

SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)

SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)

SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)

SCIP_RETCODE SCIPprintVar(SCIP *scip, SCIP_VAR *var, FILE *file)

SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)

SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)

void SCIPsortDownPtrPtr(void **ptrarray1, void **ptrarray2, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)

int SCIPsparseSolGetNVars(SCIP_SPARSESOL *sparsesol)

SCIP_Longint * SCIPsparseSolGetLbs(SCIP_SPARSESOL *sparsesol)

void SCIPsparseSolGetFirstSol(SCIP_SPARSESOL *sparsesol, SCIP_Longint *sol, int nvars)

SCIP_RETCODE SCIPsparseSolCreate(SCIP_SPARSESOL **sparsesol, SCIP_VAR **vars, int nvars, SCIP_Bool cleared)

SCIP_Longint * SCIPsparseSolGetUbs(SCIP_SPARSESOL *sparsesol)

void SCIPsparseSolFree(SCIP_SPARSESOL **sparsesol)

SCIP_Bool SCIPsparseSolGetNextSol(SCIP_SPARSESOL *sparsesol, SCIP_Longint *sol, int nvars)

int SCIPsnprintf(char *t, int len, const char *s,...)

static const SCIP_Real scalars[]

memory allocation routines

BMS_BLKMEM * SCIPblkmem(SCIP *scip)

public methods for managing constraints

public methods for user interface dialog

public methods for displaying runtime statistics

public methods for primal heuristics

public methods for message output

#define SCIPdebugPrintCons(x, y, z)

public data structures and miscellaneous methods

methods for sorting joint arrays of various types

public methods for primal CIP solutions

public methods for problem variables

public methods for branching rule plugins and branching

public methods for constraint handler plugins and constraints

public methods for dialog handler plugins

public methods for display handler plugins

public methods for primal heuristic plugins and divesets

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 solutions

public methods for SCIP variables

struct SCIP_ConshdlrData SCIP_CONSHDLRDATA

enum SCIP_BoundType SCIP_BOUNDTYPE

@ SCIP_PARAMEMPHASIS_COUNTER

enum SCIP_Result SCIP_RESULT

enum SCIP_Retcode SCIP_RETCODE

@ SCIP_STAGE_INITPRESOLVE

@ SCIP_STAGE_EXITPRESOLVE

@ SCIP_STAGE_TRANSFORMING

type definitions for symmetry computations

#define SYM_TIMING_AFTERPRESOL

#define SYM_HANDLETYPE_SYMCONS

@ SCIP_VARTYPE_CONTINUOUS


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