optimize_mango.cpp
Go to the documentation of this file.
1
// Copyright 2019, University of Maryland and the MANGO development team.
2
//
3
// This file is part of MANGO.
4
//
5
// MANGO is free software: you can redistribute it and/or modify it
6
// under the terms of the GNU Lesser General Public License as
7
// published by the Free Software Foundation, either version 3 of the
8
// License, or (at your option) any later version.
9
//
10
// MANGO is distributed in the hope that it will be useful, but
11
// WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
// Lesser General Public License for more details.
14
//
15
// You should have received a copy of the GNU Lesser General Public
16
// License along with MANGO. If not, see
17
// <https://www.gnu.org/licenses/>.
18
19
#include <stdexcept>
20
#include "
Solver.hpp
"
21
#include "
Package_mango.hpp
"
22
// <includes>
23
// This section was automatically generated by ./update_algorithms
24
#include "
Imfil.hpp
"
25
// </includes>
26
27
void
mango::Package_mango::optimize
(
Solver
* solver) {
28
Algorithm
* algorithm;
29
30
switch
(solver->
algorithm
) {
31
// <algorithms>
32
// This section was automatically generated by ./update_algorithms
33
case
MANGO_IMFIL
:
34
algorithm =
new
Imfil
(solver);
35
break
;
36
// </algorithms>
37
default
:
38
throw
std::runtime_error(
"Error in mango::Package_mango::optimize(). Unexpected algorithm."
);
39
}
40
41
algorithm->
solve
();
42
}
mango::Imfil
Definition:
Imfil.hpp:8
mango::Package_mango::optimize
void optimize(Solver *)
Definition:
optimize_mango.cpp:27
Solver.hpp
mango::Algorithm
Definition:
Package_mango.hpp:43
mango::MANGO_IMFIL
@ MANGO_IMFIL
Definition:
mango.hpp:79
Package_mango.hpp
mango::Solver::algorithm
algorithm_type algorithm
Definition:
Solver.hpp:42
mango::Algorithm::solve
virtual void solve()=0
mango::Solver
Definition:
Solver.hpp:31
Imfil.hpp