Commit f5f5f876 authored by Jonas Seidel's avatar Jonas Seidel

providing mip solving support through scip

parent 3d4dc3e1
......@@ -7,3 +7,4 @@ linear_program_test
maintenance_problem_test
.test
.data/Maintenance_Problem/mp
.data/.cache/*.lp
......@@ -36,6 +36,15 @@ size_t Linear_Program::direction_end(){
std::vector<double>& Linear_Program::direction(){
return this->_direction;
void Linear_Program::solve(){
std::stringstream path;
path << "./.data/.cache/" << this << ".lp";
std::ofstream ofs(path.str());
ofs << "solving:\n" << *this << std::endl;
std::stringstream command;
command << "scip -c \"read " << path.str() << " optimize quit \"";
system(command.str().c_str());
}
void Linear_Program::operator=(Linear_Program& lp){
......
......@@ -24,6 +24,7 @@ public:
size_t& direction_start();
size_t direction_end();
std::vector<double>& direction();
void solve();
void operator=(Linear_Program& lp);
void operator=(Linear_Program&& lp);
......
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