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
6f01aa6c
Commit
6f01aa6c
authored
Jan 17, 2018
by
Max Lyon
Browse files
set start solution in gurobi solver
parent
347eddd6
Pipeline
#6066
failed with stages
in 7 minutes and 28 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
NSolver/GUROBISolver.cc
View file @
6f01aa6c
...
...
@@ -361,6 +361,12 @@ solve_two_phase(NProblemInterface* _problem, //
case
2
:
vars
.
push_back
(
model
.
addVar
(
-
GRB_INFINITY
,
GRB_INFINITY
,
0.0
,
GRB_BINARY
)
);
break
;
}
// set start
std
::
vector
<
double
>
start
(
vars
.
size
());
_problem
->
initial_x
(
start
.
data
());
for
(
int
i
=
0
;
i
<
_problem
->
n_unknowns
();
++
i
)
vars
[
i
].
set
(
GRB_DoubleAttr_Start
,
start
[
i
]);
// Integrate new variables
model
.
update
();
...
...
Write
Preview
Markdown
is supported
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