Scippy

SCIP

Solving Constraint Integer Programs

cons_countsols.h File Reference

Detailed Description

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.

#include "scip/scip.h"

Go to the source code of this file.

Functions

 SCIP_DECL_DIALOGEXEC (SCIPdialogExecCountPresolve)
 
 SCIP_DECL_DIALOGEXEC (SCIPdialogExecCount)
 
 SCIP_DECL_DIALOGEXEC (SCIPdialogExecWriteAllsolutions)
 
SCIP_RETCODE SCIPincludeConshdlrCountsols (SCIP *scip)
 
SCIP_RETCODE SCIPcount (SCIP *scip)
 
SCIP_Longint SCIPgetNCountedSols (SCIP *scip, SCIP_Bool *valid)
 
void SCIPgetNCountedSolsstr (SCIP *scip, char **buffer, int buffersize, int *requiredsize)
 
SCIP_Longint SCIPgetNCountedFeasSubtrees (SCIP *scip)
 
void SCIPgetCountedSparseSols (SCIP *scip, SCIP_VAR ***vars, int *nvars, SCIP_SPARSESOL ***sols, int *nsols)
 
SCIP_RETCODE SCIPsetParamsCountsols (SCIP *scip)
 

Function Documentation

SCIP_DECL_DIALOGEXEC ( SCIPdialogExecCountPresolve  )

dialog execution method for the count command

SCIP_DECL_DIALOGEXEC ( SCIPdialogExecCount  )

dialog execution method for the count command

SCIP_DECL_DIALOGEXEC ( SCIPdialogExecWriteAllsolutions  )

execution method of dialog for writing all solutions

SCIP_RETCODE SCIPincludeConshdlrCountsols ( SCIP scip)

creates the handler for countsol constraints and includes it in SCIP

Parameters
scipSCIP data structure
SCIP_RETCODE SCIPcount ( SCIP scip)

execute counting

Parameters
scipSCIP data structure
SCIP_Longint SCIPgetNCountedSols ( SCIP scip,
SCIP_Bool valid 
)

returns number of feasible solutions found as SCIP_Longint; if the number does not fit into a SCIP_Longint the valid flag is set to FALSE

Parameters
scipSCIP data structure
validpointer to store if the return value is valid
void SCIPgetNCountedSolsstr ( SCIP scip,
char **  buffer,
int  buffersize,
int *  requiredsize 
)

returns number of counted solutions as string

Parameters
scipSCIP data structure
bufferbuffer to store the number for counted solutions
buffersizebuffer size
requiredsizepointer to store the required size
SCIP_Longint SCIPgetNCountedFeasSubtrees ( SCIP scip)

returns number of counted feasible subtrees

Parameters
scipSCIP data structure
void SCIPgetCountedSparseSols ( SCIP scip,
SCIP_VAR ***  vars,
int *  nvars,
SCIP_SPARSESOL ***  sols,
int *  nsols 
)

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
scipSCIP data structure
varspointer to variable array defining to variable order
nvarsnumber of variables
solspointer to the solutions
nsolspointer to number of solutions
SCIP_RETCODE SCIPsetParamsCountsols ( SCIP scip)

setting SCIP parameters for such that a valid counting process is possible

Parameters
scipSCIP data structure