aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2013-05-10 02:48:36 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2013-12-13 02:40:30 -0500
commite3e2eb62f1724c391f84cb11cddcbd965399a216 (patch)
tree1c67ef52c68ccfec62b8cbd3989b8ba6c968c76e
parentc16119807b2c39cf66b8e805359b7ee7d53747a5 (diff)
testmain: add MSRP analysis
-rw-r--r--native/src/testmain.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/native/src/testmain.cpp b/native/src/testmain.cpp
index a68b786..0767a07 100644
--- a/native/src/testmain.cpp
+++ b/native/src/testmain.cpp
@@ -930,6 +930,20 @@ int main(int argc, char** argv)
930 930
931 delete results; 931 delete results;
932 932
933 results = msrp_bounds(rsi, 5);
934
935 cout << endl << endl << "MSRP (old)" << endl;
936 for (i = 0; i < results->size(); i++)
937 cout << "T" << i
938 << " y=" << rsi.get_tasks()[i].get_priority()
939 << " c=" << rsi.get_tasks()[i].get_cluster()
940 << ": total=" << (*results)[i].total_length
941 << " remote=" << results->get_remote_blocking(i)
942 << " local=" << results->get_local_blocking(i)
943 << endl;
944
945 delete results;
946
933 947
934#if defined(CONFIG_HAVE_CPLEX) || defined(CONFIG_HAVE_GLPK) 948#if defined(CONFIG_HAVE_CPLEX) || defined(CONFIG_HAVE_GLPK)
935 949
@@ -975,6 +989,22 @@ int main(int argc, char** argv)
975 989
976 delete results; 990 delete results;
977 991
992
993 results = lp_msrp_bounds(rsi);
994
995 cout << endl << endl << "MSRP (LP)" << endl;
996 for (i = 0; i < results->size(); i++)
997 cout << "T" << i
998 << " y=" << rsi.get_tasks()[i].get_priority()
999 << " c=" << rsi.get_tasks()[i].get_cluster()
1000 << ": total=" << (*results)[i].total_length
1001 << " remote=" << results->get_remote_blocking(i)
1002 << " local=" << results->get_local_blocking(i)
1003 << endl;
1004
1005 delete results;
1006
1007
978 bool check_for_memory_leaks = true; 1008 bool check_for_memory_leaks = true;
979 1009
980 // Run the LP code in a loop to see if memory footprint increases 1010 // Run the LP code in a loop to see if memory footprint increases