Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
COBREXA.jl
Manage
Activity
Members
Plan
External wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LCSB-BioCore
COBREXA.jl
Commits
f07e6532
Unverified
Commit
f07e6532
authored
3 years ago
by
Miroslav Kratochvil
Browse files
Options
Downloads
Patches
Plain Diff
clean solver
parent
d168ac75
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/base/solver.jl
+17
-4
17 additions, 4 deletions
src/base/solver.jl
with
17 additions
and
4 deletions
src/base/solver.jl
+
17
−
4
View file @
f07e6532
"""
function make_optimization_model(
model::MetabolicModel,
optimizer;
sense = MOI.MAX_SENSE,
)
Convert CoreModel to the JuMP model, place objectives and the equality
constraint.
"""
function
make_optimization_model
(
model
::
M
M
,
model
::
M
etabolicModel
,
optimizer
;
sense
=
MOI
.
MAX_SENSE
,
)
where
{
MM
<:
MetabolicModel
}
)
m
,
n
=
size
(
stoichiometry
(
model
))
xl
,
xu
=
bounds
(
model
)
...
...
@@ -21,13 +28,19 @@ function make_optimization_model(
end
"""
optimize_model(
model::MetabolicModel,
optimizer;
sense = MOI.MIN_SENSE,
)
Use JuMP to solve an instance of CoreModel
"""
function
optimize_model
(
model
::
L
M
,
model
::
M
etabolicModel
,
optimizer
;
sense
=
MOI
.
MIN_SENSE
,
)
where
{
LM
<:
MetabolicModel
}
)
optimization_model
=
make_optimization_model
(
model
,
optimizer
;
sense
=
sense
)
COBREXA
.
JuMP
.
optimize!
(
optimization_model
)
return
optimization_model
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment