Commit 3da110c4 authored by jonas's avatar jonas
Browse files

tests to determine further when standard is better than benders

parent 45af273c
......@@ -37,4 +37,7 @@ share-of-critical_connector-capacity_network_connectors_buffer
share-of-critical_dummy
share-of-critical_dummy_constant_nincidences
share-of-critical_dummy_edge_compensated
nincidences_dummy_simple
nincidences_dummy_non_simple
nedges_dummy_cut_networks
thread_test
......@@ -15,7 +15,7 @@ int main(int argc, char** argv){
number_of_instances_per_coord = std::atoi(argv[2]);
}
std::function<maintenance_problem_generator(double, double)> test_generator = [](double nedges, double nepochs){
std::function<maintenance_problem_generator(double, double)> test_generator = [](double nedges, double dummy){
return maintenance_problem_generator(
random_graph_generator(
// shelter_orphans only_tip_fringes only_tip_extreme_layer
......@@ -36,13 +36,13 @@ int main(int argc, char** argv){
{{{"Upper", {fix, Integral, 1, 100}}}}
),
// critical_edge_candidates
nepochs, 1, everywhere
3, 1, everywhere
);
};
if(just_probe){
probe(test_generator(60,2));
probe(test_generator(60,0));
}
return generate_and_execute_2d_plot_test(path, number_of_instances_per_coord, axis_data{"nedges", 16, 100, 250}, axis_data{"nepochs", 5, 2, 6}, test_generator);
return generate_and_execute_2d_plot_test(path, number_of_instances_per_coord, axis_data{"nedges", 16, 100, 250}, axis_data{"dummy", 1, 0, 0}, test_generator);
}
#include "../../../Specialization/LP_Problems/Maintenance_Problem/Testing/maintenance_problem_testing.h"
#include "../mk_utils/probe_test.cpp"
#include <cmath>
int main(int argc, char** argv){
bool just_probe = false;
size_t number_of_instances_per_coord = 0;
assert(argc > 1);
std::string path(argv[1]);
if(path == "probe"){
just_probe = true;
}else{
assert(argc == 3);
number_of_instances_per_coord = std::atoi(argv[2]);
}
size_t nedges = 250;
std::function<maintenance_problem_generator(double, double)> test_generator = [&nedges](double nincid, double dummy){
return maintenance_problem_generator(
random_graph_generator(
// shelter_orphans only_tip_fringes only_tip_extreme_layer
tipping_policy(false),
// number_of_nodes number_of_steps node_attribute_generator
uniform_node_steps(round((double)(2*nedges)/nincid), 1, {{}}),
// number_of_edges fuzzing_distance_from fuzzing_distance_to edge_attribute_generator at_least_strongly_connected at_least_weakly_connected acyclic simple anti_reflexive
uniform_edge_step_fuzzing(nedges, 0, 0, {{{"Upper", {fix, Integral, 1, 100}}}}, false, false, true, false, true),
tipping_policy(false),
// number_of_nodes number_of_steps node_attribute_generator
uniform_node_steps(1, 1, {{}}),
// number_of_edges fuzzing_distance_from fuzzing_distance_to edge_attribute_generator at_least_strongly_connected at_least_weakly_connected acyclic simple anti_reflexive
uniform_edge_step_fuzzing(0, 0, 0, {{{"Upper", {fix, Integral, 1, 100}}}}, false, false, true, false, true),
{{"Flow", Attribute(max, 0)},{"Upper", Attribute(fix, 1)}, {"Selected", Attribute(fix, 0)}, {"Edgepotential", Attribute(min, 0)}},
{{"Nodepotential", Attribute(min, 0)}},
{{{"Upper", {fix, Integral, 1, 100}}}},
{},
{{{"Upper", {fix, Integral, 1, 100}}}}
),
// critical_edge_candidates
3, 1, everywhere
);
};
if(just_probe){
nedges = 50;
probe(test_generator(6,0));
}
return generate_and_execute_2d_plot_test(path, number_of_instances_per_coord, axis_data{"nincidences", 16, 5, 20}, axis_data{"dummy", 1, 0, 0}, test_generator);
}
#include "../../../Specialization/LP_Problems/Maintenance_Problem/Testing/maintenance_problem_testing.h"
#include "../mk_utils/probe_test.cpp"
#include <cmath>
int main(int argc, char** argv){
bool just_probe = false;
size_t number_of_instances_per_coord = 0;
assert(argc > 1);
std::string path(argv[1]);
if(path == "probe"){
just_probe = true;
}else{
assert(argc == 3);
number_of_instances_per_coord = std::atoi(argv[2]);
}
size_t nedges = 250;
std::function<maintenance_problem_generator(double, double)> test_generator = [&nedges](double nincid, double dummy){
return maintenance_problem_generator(
random_graph_generator(
// shelter_orphans only_tip_fringes only_tip_extreme_layer
tipping_policy(false),
// number_of_nodes number_of_steps node_attribute_generator
uniform_node_steps(round((double)(2*nedges)/nincid), 1, {{}}),
// number_of_edges fuzzing_distance_from fuzzing_distance_to edge_attribute_generator at_least_strongly_connected at_least_weakly_connected acyclic simple anti_reflexive
uniform_edge_step_fuzzing(nedges, 0, 0, {{{"Upper", {fix, Integral, 1, 100}}}}, false, false, true, true, true),
tipping_policy(false),
// number_of_nodes number_of_steps node_attribute_generator
uniform_node_steps(1, 1, {{}}),
// number_of_edges fuzzing_distance_from fuzzing_distance_to edge_attribute_generator at_least_strongly_connected at_least_weakly_connected acyclic simple anti_reflexive
uniform_edge_step_fuzzing(0, 0, 0, {{{"Upper", {fix, Integral, 1, 100}}}}, false, false, true, true, true),
{{"Flow", Attribute(max, 0)},{"Upper", Attribute(fix, 1)}, {"Selected", Attribute(fix, 0)}, {"Edgepotential", Attribute(min, 0)}},
{{"Nodepotential", Attribute(min, 0)}},
{{{"Upper", {fix, Integral, 1, 100}}}},
{},
{{{"Upper", {fix, Integral, 1, 100}}}}
),
// critical_edge_candidates
3, 1, everywhere
);
};
if(just_probe){
nedges = 50;
probe(test_generator(6,0));
}
return generate_and_execute_2d_plot_test(path, number_of_instances_per_coord, axis_data{"nincidences", 16, 5, 20}, axis_data{"dummy", 1, 0, 0}, test_generator);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment