Detailed Description
tests for Steiner tree heuristics
This file implements tests for Steiner problem local search heuristics.
A list of all interface methods can be found in stptest.h.
Definition in file stptest_heurlocal.c.
#include <stdio.h>
#include <assert.h>
#include "stptest.h"
#include "graph.h"
#include "solstp.h"
#include "heur_local.h"
#include "heur_tm.h"
Go to the source code of this file.
Functions | |
static SCIP_RETCODE | localKeyPathExchange (SCIP *scip) |
static SCIP_RETCODE | localKeyPathExchangePc (SCIP *scip) |
static SCIP_RETCODE | localKeyPathExchangePc2 (SCIP *scip) |
static SCIP_RETCODE | localKeyPathExchangeMw (SCIP *scip) |
static SCIP_RETCODE | localKeyVertex (SCIP *scip) |
static SCIP_RETCODE | localKeyVertexPc (SCIP *scip) |
static SCIP_RETCODE | localKeyVertexPc2 (SCIP *scip) |
static SCIP_RETCODE | localExtendPc (SCIP *scip) |
static SCIP_RETCODE | localInsertion (SCIP *scip) |
static SCIP_RETCODE | localInsertion2 (SCIP *scip) |
static SCIP_RETCODE | localInsertion2pc (SCIP *scip) |
SCIP_RETCODE | stptest_testHeurLocal (SCIP *scip) |
Function Documentation
◆ localKeyPathExchange()
|
static |
test key path exchange
- Parameters
-
scip SCIP data structure
Definition at line 39 of file stptest_heurlocal.c.
References CONNECT, GRAPH::edges, graph_edge_add(), graph_free(), graph_init(), graph_initHistory(), graph_knot_add(), graph_knot_chg(), graph_mark(), graph_path_exit(), graph_path_init(), GRAPH::knots, nnodes, SCIP_CALL, SCIP_OKAY, SCIPallocMemoryArray, SCIPfreeMemoryArray, SCIPStpHeurLocalRun(), solstp_isValid(), GRAPH::source, TRUE, and UNKNOWN.
Referenced by stptest_testHeurLocal().
◆ localKeyPathExchangePc()
|
static |
test key path exchange
- Parameters
-
scip SCIP data structure
Definition at line 105 of file stptest_heurlocal.c.
References CONNECT, GRAPH::edges, FALSE, graph_edge_add(), graph_free(), graph_init(), graph_initHistory(), graph_knot_add(), graph_knot_chg(), graph_mark(), graph_path_exit(), graph_path_init(), graph_pc_initPrizes(), graph_transPc(), GRAPH::knots, nnodes, GRAPH::prize, SCIP_CALL, SCIP_OKAY, SCIPallocMemoryArray, SCIPfreeMemoryArray, SCIPStpHeurLocalRun(), solstp_isValid(), solstp_prune(), GRAPH::source, TRUE, and UNKNOWN.
Referenced by stptest_testHeurLocal().
◆ localKeyPathExchangePc2()
|
static |
test key path exchange
- Parameters
-
scip SCIP data structure
Definition at line 202 of file stptest_heurlocal.c.
References GRAPH::edges, FALSE, graph_edge_add(), graph_free(), graph_init(), graph_initHistory(), graph_knot_add(), graph_knot_chg(), graph_mark(), graph_path_exit(), graph_path_init(), graph_pc_initPrizes(), graph_transPc(), GRAPH::knots, nnodes, GRAPH::prize, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPallocMemoryArray, SCIPfreeMemoryArray, SCIPisEQ(), SCIPStpHeurLocalRun(), solstp_getObjBounded(), solstp_isValid(), solstp_prune(), GRAPH::source, TRUE, and UNKNOWN.
Referenced by stptest_testHeurLocal().
◆ localKeyPathExchangeMw()
|
static |
test key path exchange
- Parameters
-
scip SCIP data structure
Definition at line 309 of file stptest_heurlocal.c.
References GRAPH::edges, FALSE, graph_edge_add(), graph_free(), graph_init(), graph_initHistory(), graph_knot_add(), graph_mark(), graph_path_exit(), graph_path_init(), graph_pc_initPrizes(), graph_transMw(), GRAPH::knots, nnodes, GRAPH::prize, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPallocMemoryArray, SCIPfreeMemoryArray, SCIPisEQ(), SCIPStpHeurLocalRun(), solstp_getObjBounded(), solstp_isValid(), solstp_prune(), GRAPH::source, TRUE, and UNKNOWN.
Referenced by stptest_testHeurLocal().
◆ localKeyVertex()
|
static |
test key vertex elimination
- Parameters
-
scip SCIP data structure
Definition at line 409 of file stptest_heurlocal.c.
References CONNECT, GRAPH::edges, FALSE, graph_edge_add(), graph_free(), graph_init(), graph_initHistory(), graph_knot_add(), graph_knot_chg(), graph_mark(), graph_path_exit(), graph_path_init(), GRAPH::knots, nnodes, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPallocMemoryArray, SCIPfreeMemoryArray, SCIPisEQ(), SCIPStpHeurLocalRun(), solstp_getObjBounded(), solstp_isValid(), solstp_prune(), GRAPH::source, TRUE, and UNKNOWN.
Referenced by stptest_testHeurLocal().
◆ localKeyVertexPc()
|
static |
test key vertex elimination
- Parameters
-
scip SCIP data structure
Definition at line 500 of file stptest_heurlocal.c.
References CONNECT, GRAPH::edges, FALSE, graph_edge_add(), graph_free(), graph_init(), graph_initHistory(), graph_knot_add(), graph_knot_chg(), graph_mark(), graph_path_exit(), graph_path_init(), graph_pc_initPrizes(), graph_transPc(), GRAPH::knots, nnodes, GRAPH::prize, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPallocMemoryArray, SCIPfreeMemoryArray, SCIPisEQ(), SCIPStpHeurLocalRun(), solstp_getObjBounded(), solstp_isValid(), solstp_prune(), GRAPH::source, TRUE, and UNKNOWN.
Referenced by stptest_testHeurLocal().
◆ localKeyVertexPc2()
|
static |
test key vertex elimination
- Parameters
-
scip SCIP data structure
Definition at line 610 of file stptest_heurlocal.c.
References CONNECT, GRAPH::edges, FALSE, graph_edge_add(), graph_free(), graph_init(), graph_initHistory(), graph_knot_add(), graph_knot_chg(), graph_mark(), graph_path_exit(), graph_path_init(), graph_pc_initPrizes(), graph_transPc(), GRAPH::knots, nnodes, GRAPH::prize, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPallocMemoryArray, SCIPfreeMemoryArray, SCIPisEQ(), SCIPStpHeurLocalRun(), solstp_getObjBounded(), solstp_isValid(), solstp_prune(), GRAPH::source, TRUE, and UNKNOWN.
Referenced by stptest_testHeurLocal().
◆ localExtendPc()
|
static |
extension test
- Parameters
-
scip SCIP data structure
Definition at line 729 of file stptest_heurlocal.c.
References GRAPH::cost, GRAPH::edges, FALSE, graph_edge_add(), graph_free(), graph_init(), graph_initHistory(), graph_knot_add(), graph_knot_chg(), graph_mark(), graph_path_exit(), graph_path_init(), graph_pc_initPrizes(), graph_transPc(), GRAPH::knots, nnodes, GRAPH::prize, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPallocMemoryArray, SCIPfreeMemoryArray, SCIPisEQ(), SCIPStpHeurLocalExtendPcMw(), solstp_getObjBounded(), solstp_isValid(), solstp_prune(), GRAPH::source, TRUE, and UNKNOWN.
Referenced by stptest_testHeurLocal().
◆ localInsertion()
|
static |
test insertion
- Parameters
-
scip SCIP data structure
Definition at line 840 of file stptest_heurlocal.c.
References CONNECT, GRAPH::edges, graph_edge_add(), graph_free(), graph_init(), graph_initHistory(), graph_knot_add(), graph_knot_chg(), graph_mark(), graph_path_exit(), graph_path_init(), GRAPH::knots, nnodes, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPallocMemoryArray, SCIPfreeMemoryArray, SCIPisEQ(), SCIPStpHeurLocalRun(), solstp_getObjBounded(), solstp_isValid(), GRAPH::source, STP_SPG, GRAPH::stp_type, TRUE, and UNKNOWN.
Referenced by stptest_testHeurLocal().
◆ localInsertion2()
|
static |
test insertion
- Parameters
-
scip SCIP data structure
Definition at line 917 of file stptest_heurlocal.c.
References CONNECT, GRAPH::edges, graph_edge_add(), graph_free(), graph_init(), graph_initHistory(), graph_knot_add(), graph_knot_chg(), graph_mark(), graph_path_exit(), graph_path_init(), GRAPH::knots, nnodes, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPallocMemoryArray, SCIPfreeMemoryArray, SCIPisEQ(), SCIPStpHeurLocalRun(), solstp_getObjBounded(), solstp_isValid(), GRAPH::source, STP_SPG, GRAPH::stp_type, TRUE, and UNKNOWN.
Referenced by stptest_testHeurLocal().
◆ localInsertion2pc()
|
static |
test insertion
- Parameters
-
scip SCIP data structure
Definition at line 999 of file stptest_heurlocal.c.
References GRAPH::edges, FALSE, graph_edge_add(), graph_free(), graph_init(), graph_initHistory(), graph_knot_add(), graph_knot_chg(), graph_mark(), graph_path_exit(), graph_path_init(), graph_pc_initPrizes(), graph_transPc(), GRAPH::knots, nnodes, GRAPH::prize, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPallocMemoryArray, SCIPfreeMemoryArray, SCIPisEQ(), SCIPStpHeurLocalRun(), solstp_getObjBounded(), solstp_prune(), GRAPH::source, STP_SPG, GRAPH::stp_type, TRUE, and UNKNOWN.
Referenced by stptest_testHeurLocal().
◆ stptest_testHeurLocal()
SCIP_RETCODE stptest_testHeurLocal | ( | SCIP * | scip | ) |
test local search heuristics
- Parameters
-
scip SCIP data structure
Definition at line 1108 of file stptest_heurlocal.c.
References localExtendPc(), localInsertion(), localInsertion2(), localInsertion2pc(), localKeyPathExchange(), localKeyPathExchangeMw(), localKeyPathExchangePc(), localKeyPathExchangePc2(), localKeyVertex(), localKeyVertexPc(), localKeyVertexPc2(), SCIP_CALL, and SCIP_OKAY.
Referenced by stptest_testAll().