|
Constraint handler for counting feasible solutions.
- Author
- Stefan Heinz
-
Michael Winkler
If this constraint handler is activated than it counts or collects all feasible solutions. We refer to How to use SCIP to count/enumerate feasible solutions for more details about using SCIP for counting feasible solutions.
Definition in file cons_countsols.h.
Go to the source code of this file.
SCIP_DECL_DIALOGEXEC |
( |
SCIPdialogExecCountPresolve |
| ) |
|
dialog execution method for the count command
Definition at line 1769 of file cons_countsols.c.
References CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_DIALOGEXEC(), SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_FREE, SCIP_STAGE_FREETRANS, SCIP_STAGE_INIT, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_TRANSFORMING, SCIPdialoghdlrAddHistory(), SCIPdialoghdlrGetRoot(), SCIPdialogMessage(), SCIPerrorMessage, SCIPgetBoolParam(), SCIPgetStage(), SCIPpresolve(), SCIPsetBoolParam(), and TRUE.
Referenced by SCIP_DECL_CONSLOCK(), SCIP_DECL_DIALOGEXEC(), and writeExpandedSolutions().
SCIP_DECL_DIALOGEXEC |
( |
SCIPdialogExecCount |
| ) |
|
dialog execution method for the count command
Definition at line 1830 of file cons_countsols.c.
References CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_SORTPTRCOMP(), SCIP_INVALIDCALL, SCIP_Longint, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_FREE, SCIP_STAGE_FREETRANS, SCIP_STAGE_INIT, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_TRANSFORMING, SCIP_VERBLEVEL_FULL, SCIPallocBufferArray, SCIPcount(), SCIPdialoghdlrAddHistory(), SCIPdialoghdlrGetRoot(), SCIPdialogMessage(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetBoolParam(), SCIPgetIntParam(), SCIPgetNContVars(), SCIPgetNCountedFeasSubtrees(), SCIPgetNCountedSols(), SCIPgetNCountedSolsstr(), SCIPgetStage(), SCIPisParamFixed(), SCIPpresolve(), SCIPreallocBufferArray, SCIPsetBoolParam(), SCIPsetIntParam(), SCIPunfixParam(), SCIPverbMessage(), SCIPwarningMessage(), and TRUE.
SCIP_DECL_DIALOGEXEC |
( |
SCIPdialogExecWriteAllsolutions |
| ) |
|
execution method of dialog for writing all solutions
Definition at line 2142 of file cons_countsols.c.
References CONSHDLR_NAME, createCountDialog(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_Longint, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_FREE, SCIP_STAGE_FREETRANS, SCIP_STAGE_INIT, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_TRANSFORMING, SCIP_VARTYPE_CONTINUOUS, SCIPallocBufferArray, SCIPconshdlrGetData(), SCIPdialoghdlrAddHistory(), SCIPdialoghdlrClearBuffer(), SCIPdialoghdlrGetRoot(), SCIPdialoghdlrGetWord(), SCIPdialogMessage(), SCIPduplicateBufferArray, SCIPerrorMessage, SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetNCountedSols(), SCIPgetNCountedSolsstr(), SCIPgetNOrigVars(), SCIPgetOrigVars(), SCIPgetStage(), SCIPgetTransformedVar(), SCIPinfoMessage(), SCIPreallocBufferArray, SCIPsortDownPtrPtr(), SCIPvarGetName(), SCIPvarGetType(), TRUE, and writeExpandedSolutions().
execute counting
- Parameters
-
Definition at line 2572 of file cons_countsols.c.
References checkParameters(), CONSHDLR_NAME, FALSE, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPgetBoolParam(), SCIPgetNCountedSols(), SCIPsetBoolParam(), SCIPsolve(), and TRUE.
Referenced by SCIP_DECL_DIALOGEXEC(), and SCIPincludeConshdlrCountsols().
void SCIPgetNCountedSolsstr |
( |
SCIP * |
scip, |
|
|
char ** |
buffer, |
|
|
int |
buffersize, |
|
|
int * |
requiredsize |
|
) |
| |
Method to get the sparse solution.
- Note
- You get the pointer to the sparse solutions stored in the constraint handler (not a copy).
-
The sparse solutions are stored w.r.t. the active variables. This are the variables which got not removed during presolving. For none active variables the value has to be computed depending on their aggregation type. See for more details about that Collect all feasible solution.
- Parameters
-
scip | SCIP data structure |
vars | pointer to active variable array defining to variable order |
nvars | number of active variables |
sols | pointer to the solutions |
nsols | pointer to number of solutions |
Definition at line 2690 of file cons_countsols.c.
References CONSHDLR_NAME, NULL, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPsetParamsCountsols().
Referenced by SCIPgetNCountedFeasSubtrees().
|