Detailed Description
includes solution pool for Steiner tree problems
Definition in file solpool.h.
Go to the source code of this file.
Data Structures | |
struct | stp_solution |
struct | stp_solution_pool |
Typedefs | |
typedef struct stp_solution | STPSOL |
typedef struct stp_solution_pool | STPSOLPOOL |
Functions | |
SCIP_Bool | solpool_isContained (const int *soledges, const STPSOLPOOL *pool) |
STPSOL * | solpool_solFromIndex (STPSOLPOOL *pool, const int soindex) |
SCIP_RETCODE | solpool_init (SCIP *scip, STPSOLPOOL **pool, const int nedges, const int maxsize) |
SCIP_RETCODE | solpool_addSol (SCIP *scip, const SCIP_Real obj, const int *soledges, STPSOLPOOL *pool, SCIP_Bool *success) |
SCIP_RETCODE | solpool_addSolToScip (SCIP *scip, SCIP_HEUR *heur, const GRAPH *g, const int *result, SCIP_Bool *success) |
void | solpool_free (SCIP *scip, STPSOLPOOL **pool) |
Typedef Documentation
◆ STPSOL
typedef struct stp_solution STPSOL |
element of Steiner tree solution pool
◆ STPSOLPOOL
typedef struct stp_solution_pool STPSOLPOOL |
edge based solution pool for Steiner tree problems (in presolving)
Function Documentation
◆ solpool_isContained()
SCIP_Bool solpool_isContained | ( | const int * | soledges, |
const STPSOLPOOL * | pool | ||
) |
is given solution in pool?
- Parameters
-
soledges edge array of solution to be checked pool the pool
Definition at line 35 of file solpool.c.
References FALSE, stp_solution_pool::nedges, NULL, SCIPdebugMessage, stp_solution_pool::size, stp_solution::soledges, stp_solution_pool::sols, and TRUE.
Referenced by solpool_addSol().
◆ solpool_solFromIndex()
STPSOL* solpool_solFromIndex | ( | STPSOLPOOL * | pool, |
const int | soindex | ||
) |
get solution from index
- Parameters
-
pool the pool soindex the index
Definition at line 66 of file solpool.c.
References stp_solution::index, NULL, stp_solution_pool::size, and stp_solution_pool::sols.
Referenced by computeSteinerTreeRedCosts(), and computeSteinerTreeRedCostsPcMw().
◆ solpool_init()
SCIP_RETCODE solpool_init | ( | SCIP * | scip, |
STPSOLPOOL ** | pool, | ||
const int | nedges, | ||
const int | maxsize | ||
) |
initializes STPSOL pool
- Parameters
-
scip SCIP data structure pool the pool nedges number of edges of solutions to be stored in the pool maxsize capacity of pool
Definition at line 91 of file solpool.c.
References stp_solution_pool::maxindex, stp_solution_pool::maxsize, stp_solution_pool::nedges, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory(), SCIPallocMemoryArray, stp_solution_pool::size, and stp_solution_pool::sols.
Referenced by reduce_da(), and reduce_daPcMw().
◆ solpool_addSol()
SCIP_RETCODE solpool_addSol | ( | SCIP * | scip, |
const SCIP_Real | obj, | ||
const int * | soledges, | ||
STPSOLPOOL * | pool, | ||
SCIP_Bool * | success | ||
) |
tries to add STPSOL to pool
- Parameters
-
scip SCIP data structure obj objective of solution to be added soledges edge array of solution to be added pool the pool success has solution been added?
Definition at line 183 of file solpool.c.
References BMScopyMemoryArray, FALSE, stp_solution::index, stp_solution_pool::maxindex, stp_solution_pool::maxsize, stp_solution_pool::nedges, NULL, stp_solution::obj, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory(), SCIPallocMemoryArray, SCIPdebugMessage, SCIPisGT(), stp_solution_pool::size, stp_solution::soledges, solpool_isContained(), stp_solution_pool::sols, and TRUE.
Referenced by computeSteinerTreeRedCosts(), computeSteinerTreeRedCostsPcMw(), daPcAddTmSolToPool(), and poolAddSol().
◆ solpool_addSolToScip()
SCIP_RETCODE solpool_addSolToScip | ( | SCIP * | scip, |
SCIP_HEUR * | heur, | ||
const GRAPH * | g, | ||
const int * | result, | ||
SCIP_Bool * | success | ||
) |
tries to add sol to SCIP
- Parameters
-
scip SCIP data structure heur heuristic data structure or NULL g graph data structure result edge array of solution to be added success has solution been added?
Definition at line 150 of file solpool.c.
References CONNECT, graph_get_nEdges(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugMessage, SCIPfreeBufferArray, SCIPprobdataAddNewSol(), and SCIPprobdataGetNVars().
Referenced by addRedsol(), and SCIPStpHeurAscendPruneRun().
◆ solpool_free()
void solpool_free | ( | SCIP * | scip, |
STPSOLPOOL ** | pool | ||
) |
frees STPSOL pool
- Parameters
-
scip SCIP data structure pool the pool
Definition at line 122 of file solpool.c.
References stp_solution_pool::maxsize, NULL, SCIPfreeBlockMemory, SCIPfreeMemoryArray, stp_solution_pool::size, stp_solution::soledges, and stp_solution_pool::sols.
Referenced by daPcMarkRoots(), reduce_da(), and reduce_daPcMw().