Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
COBREXA.jl
Commits
e9410821
Unverified
Commit
e9410821
authored
May 09, 2021
by
St. Elmo
Browse files
added warm start capability to fva and pfba
parent
0081b9b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/analysis/flux_variability_analysis.jl
View file @
e9410821
...
@@ -145,6 +145,9 @@ function _FVA_optimize_reaction(model, rid, ret)
...
@@ -145,6 +145,9 @@ function _FVA_optimize_reaction(model, rid, ret)
var
=
all_variables
(
model
)[
abs
(
rid
)]
var
=
all_variables
(
model
)[
abs
(
rid
)]
@objective
(
model
,
sense
,
var
)
@objective
(
model
,
sense
,
var
)
if
termination_status
(
model
)
!=
MOI
.
OPTIMIZE_NOT_CALLED
&&
solver_name
(
model
)
in
[
"Gurobi"
,
]
set_start_value
.
(
all_variables
(
model
),
value
.
(
all_variables
(
model
)))
# warm start
end
optimize!
(
model
)
optimize!
(
model
)
if
is_solved
(
model
)
if
is_solved
(
model
)
...
...
src/analysis/parsimonious_flux_balance_analysis.jl
View file @
e9410821
...
@@ -54,6 +54,11 @@ function parsimonious_flux_balance_analysis(
...
@@ -54,6 +54,11 @@ function parsimonious_flux_balance_analysis(
# add the minimization constraint for total flux
# add the minimization constraint for total flux
v
=
opt_model
[
:
x
]
# fluxes
v
=
opt_model
[
:
x
]
# fluxes
if
solver_name
(
opt_model
)
in
[
"Gurobi"
,
]
set_start_value
.
(
all_variables
(
opt_model
),
value
.
(
all_variables
(
opt_model
)))
# warm start
end
@objective
(
opt_model
,
Min
,
sum
(
dot
(
v
,
v
)))
@objective
(
opt_model
,
Min
,
sum
(
dot
(
v
,
v
)))
for
rb
in
relax_bounds
for
rb
in
relax_bounds
...
...
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