-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test is working for DR PCTSP variance constraint
- Loading branch information
1 parent
57799d5
commit 377fb76
Showing
6 changed files
with
184 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#include <gtest/gtest.h> | ||
#include <objscip/objscipdefplugins.h> | ||
#include "pctsp/graph.hh" | ||
#include "pctsp/robust.hh" | ||
#include "fixtures.hh" | ||
|
||
|
||
typedef GraphFixture RobustFixture; | ||
|
||
TEST_P(RobustFixture, testSolveRobustDistRobustPrizeCollectingTsp) { | ||
auto graph = getGraph(); | ||
auto quota = getQuota(); | ||
auto rootVertex = getRootVertex(); | ||
auto costMeanMap = getCostMap(graph); | ||
auto costSigmaMap = getCostSigmaMap(graph); | ||
auto prizeMap = getPrizeMap(graph); | ||
// addSelfLoopsToGraph(graph); | ||
// assignZeroCostToSelfLoops(graph, costMeanMap); | ||
// assignZeroCostToSelfLoops(graph, costSigmaMap); | ||
|
||
std::string testName = "testSolveRobustDistRobustPrizeCollectingTsp-"; | ||
testName.append(getParamName()); | ||
|
||
std::vector<PCTSPvertex> tour; | ||
auto first = tour.begin(); | ||
auto last = tour.end(); | ||
std::vector<PCTSPedge> heuristicEdges = getEdgesInWalk(graph, first, last); | ||
|
||
SCIP* scip = NULL; | ||
SCIPcreate(&scip); | ||
SCIPincludeDefaultPlugins(scip); // FIXME!!!! | ||
auto solution = solveDistRobustPrizeCollectingTsp( | ||
scip, | ||
graph, | ||
costMeanMap, | ||
costSigmaMap, | ||
prizeMap, | ||
quota, | ||
rootVertex, | ||
testName | ||
); | ||
} | ||
|
||
INSTANTIATE_TEST_SUITE_P( | ||
TestAlgorithms, | ||
RobustFixture, | ||
::testing::Values(GraphType::SUURBALLE, GraphType::GRID8, GraphType::COMPLETE4, GraphType::COMPLETE5) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters