Limbo 3.5.4
Loading...
Searching...
No Matches
test_MultiKnapsackLagRelax.cpp
Go to the documentation of this file.
1
7#include <iostream>
9
10
13void test(std::string const& filename)
14{
16 model_type optModel;
17 optModel.read(filename);
18
19 // print problem
20 optModel.print(std::cout);
21
23
24 // solve
25 limbo::solvers::SolverProperty status = solver();
26 std::cout << "Problem solved " << limbo::solvers::toString(status) << "\n";
27
28 // print solutions
29 optModel.printSolution(std::cout);
30 // print problem
31 optModel.print(std::cout);
32}
33
37int main(int argc, char** argv)
38{
39 if (argc > 1)
40 {
41 // test file API
42 test(argv[1]);
43 }
44 else std::cout << "at least one argument is required\n";
45
46 return 0;
47}
48
Solve multiple knapsack problem with lagrangian relaxation.
model to describe an optimization problem
Definition Solvers.h:1161
void read(std::string const &filename)
read lp format
Definition Solvers.h:1464
Solve multiple knapsack problem with lagrangian relaxation.
SolverProperty
Some enums used in solver.
Definition Solvers.h:30
std::string toString(SolverProperty sp)
Convert limbo::solvers::SolverProperty to std::string.
Definition Solvers.h:44
int main()
void test(std::string const &filename)
test file API