Commit 3d4dc3e1 authored by Jonas Seidel's avatar Jonas Seidel
Browse files

fixing erroneous problem generation

parent b9beb5fb
......@@ -55,7 +55,7 @@ Common := ./Common_Types/
Linear_Program_dep := Polyeder.o
Polyeder_dep := Constraint.o
Constraint_dep := Variable.o
maintenance_problem_generator_dep := Maintenance_Problem.o lp_generator.h lp_generator.ipp
maintenance_problem_generator_dep := Maintenance_Problem.o
Maintenance_Problem_crossdep := Linear_Programming/Linear_Program.o $(GRAPH_DEP)
$(GRAPH_OUT) $(LP_OUT) $(LP_PROBLEMS_OUT) $(COMMON_OUT): $$(patsubst %.o,%.cpp,$$@) $$(patsubst %.o,%.h,$$@) $$(addprefix $$(@D)/,$$($$(patsubst %.o,%_dep,$$(@F)))) $$($$(patsubst %.o,%_crossdep,$$(@F)))
$(CXX) $(CXXFLAGS) -c $(patsubst %.o, %.cpp, $@) -o $@
......
......@@ -37,7 +37,7 @@ Maintenance_Problem::Maintenance_Problem(CircSelectNetwork& g, CircSelectNode* s
constraints.push_back({capacity_name.str(), Inequality, {{}, {{{edge, Flow}, 1}}}, edge->attribute(Capacity).value()});
constraints.push_back({non_critical_fix.str(), Equality, {{}, {{{edge, Critical}, 1}}}, 0});
}else{
constraints.push_back({capacity_name.str(), Inequality, {{}, {{{edge, Flow}, 1},{{edge,Critical}, -edge->attribute(Capacity).value()}}}, edge->attribute(Capacity).value()});
constraints.push_back({capacity_name.str(), Inequality, {{}, {{{edge, Flow}, 1},{{edge,Critical}, edge->attribute(Capacity).value()}}}, edge->attribute(Capacity).value()});
}
return constraints;
},
......
......@@ -11,9 +11,9 @@ int main(){
random_graph_generator<CircSelectNodeFields, CircSelectEdgeFields>(
{{Flow, Attribute(max, 0)}, {Demand, Attribute(fix, 0)}, {Capacity, Attribute(fix, 1)}, {Critical, Attribute(fix, 0)}},
{},
4,
3,
random_attribute_generator<CircSelectEdgeFields>({ {Capacity, {Continuous, 0, 5}} }),
7,
5,
random_attribute_generator<CircSelectNodeFields>({})
),
3, 2
......
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