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
6f9a8cad
Commit
6f9a8cad
authored
Dec 06, 2017
by
Max Lyon
Browse files
set a start solution for Gurobi
parent
2ddf01b9
Pipeline
#5915
failed with stages
in 6 minutes and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
NSolver/GUROBISolver.cc
View file @
6f9a8cad
...
...
@@ -125,6 +125,12 @@ solve(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
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