Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CoMISo
CoMISo
Commits
2ddf01b9
Commit
2ddf01b9
authored
Aug 21, 2017
by
Max Lyon
Browse files
change gurobi solver interface to accept const refs to vectors
parent
0b8c4ddf
Pipeline
#5598
failed with stages
in 6 minutes and 40 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Base
@
86ada33b
Subproject commit
be2213b87bda432649715ddb7967f56d27be0fdf
Subproject commit
86ada33be371319082946389b144b7b6acf9c9d3
NSolver/GUROBISolver.cc
View file @
2ddf01b9
...
...
@@ -83,8 +83,8 @@ static void process_gurobi_exception(const GRBException& _exc)
bool
GUROBISolver
::
solve
(
NProblemInterface
*
_problem
,
std
::
vector
<
NConstraintInterface
*>
&
_constraints
,
std
::
vector
<
PairIndexVtype
>
&
_discrete_constraints
,
const
std
::
vector
<
NConstraintInterface
*>
&
_constraints
,
const
std
::
vector
<
PairIndexVtype
>
&
_discrete_constraints
,
const
double
_time_limit
)
{
DEB_enter_func
;
...
...
@@ -273,8 +273,8 @@ solve(NProblemInterface* _problem,
bool
GUROBISolver
::
solve_two_phase
(
NProblemInterface
*
_problem
,
// problem instance
std
::
vector
<
NConstraintInterface
*>&
_constraints
,
// linear constraints
std
::
vector
<
PairIndexVtype
>&
_discrete_constraints
,
// discrete constraints
const
std
::
vector
<
NConstraintInterface
*>&
_constraints
,
// linear constraints
const
std
::
vector
<
PairIndexVtype
>&
_discrete_constraints
,
// discrete constraints
const
double
_time_limit0
,
// time limit phase 1 in seconds
const
double
_gap0
,
// MIP gap phase 1
const
double
_time_limit1
,
// time limit phase 2 in seconds
...
...
@@ -288,8 +288,8 @@ solve_two_phase(NProblemInterface* _problem, //
bool
GUROBISolver
::
solve_two_phase
(
NProblemInterface
*
_problem
,
// problem instance
std
::
vector
<
NConstraintInterface
*>
&
_constraints
,
// linear constraints
std
::
vector
<
PairIndexVtype
>
&
_discrete_constraints
,
// discrete constraints
const
std
::
vector
<
NConstraintInterface
*>
&
_constraints
,
// linear constraints
const
std
::
vector
<
PairIndexVtype
>
&
_discrete_constraints
,
// discrete constraints
const
double
_time_limit0
,
// time limit phase 1 in seconds
const
double
_gap0
,
// MIP gap phase 1
const
double
_time_limit1
,
// time limit phase 2 in seconds
...
...
NSolver/GUROBISolver.hh
View file @
2ddf01b9
...
...
@@ -43,14 +43,14 @@ class COMISODLLEXPORT GUROBISolver
{
public:
// ********** SOLVE **************** //
bool
solve
(
NProblemInterface
*
_problem
,
// problem instance
std
::
vector
<
NConstraintInterface
*>&
_constraints
,
// linear constraints
std
::
vector
<
PairIndexVtype
>&
_discrete_constraints
,
// discrete constraints
const
double
_time_limit
=
60
);
// time limit in seconds
bool
solve
(
NProblemInterface
*
_problem
,
// problem instance
const
std
::
vector
<
NConstraintInterface
*>&
_constraints
,
// linear constraints
const
std
::
vector
<
PairIndexVtype
>&
_discrete_constraints
,
// discrete constraints
const
double
_time_limit
=
60
);
// time limit in seconds
bool
solve
(
NProblemInterface
*
_problem
,
// problem instance
std
::
vector
<
NConstraintInterface
*>&
_constraints
,
// linear constraints
const
double
_time_limit
=
60
)
// time limit in seconds
const
std
::
vector
<
NConstraintInterface
*>&
_constraints
,
// linear constraints
const
double
_time_limit
=
60
)
// time limit in seconds
{
std
::
vector
<
PairIndexVtype
>
dc
;
return
solve
(
_problem
,
_constraints
,
dc
,
_time_limit
);
...
...
@@ -62,16 +62,16 @@ public:
// phase 2) starts only if in phase 1 no solution with a MIP gap lower than _gap1 was found and
// uses _gap1 and _time_limit2 as parameters
bool
solve_two_phase
(
NProblemInterface
*
_problem
,
// problem instance
std
::
vector
<
NConstraintInterface
*>&
_constraints
,
// linear constraints
std
::
vector
<
PairIndexVtype
>&
_discrete_constraints
,
// discrete constraints
const
std
::
vector
<
NConstraintInterface
*>&
_constraints
,
// linear constraints
const
std
::
vector
<
PairIndexVtype
>&
_discrete_constraints
,
// discrete constraints
const
double
_time_limit0
=
60
,
// time limit phase 1 in seconds
const
double
_gap0
=
0.001
,
// MIP gap phase 1
const
double
_time_limit1
=
120
,
// time limit phase 2 in seconds
const
double
_gap1
=
0.2
);
// MIP gap phase 2
bool
solve_two_phase
(
NProblemInterface
*
_problem
,
// problem instance
std
::
vector
<
NConstraintInterface
*>&
_constraints
,
// linear constraints
std
::
vector
<
PairIndexVtype
>&
_discrete_constraints
,
// discrete constraints
const
std
::
vector
<
NConstraintInterface
*>&
_constraints
,
// linear constraints
const
std
::
vector
<
PairIndexVtype
>&
_discrete_constraints
,
// discrete constraints
const
double
_time_limit0
,
// time limit phase 1 in seconds
const
double
_gap0
,
// MIP gap phase 1
const
double
_time_limit1
,
// time limit phase 2 in seconds
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment