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
96cc9bbb
Commit
96cc9bbb
authored
3 years ago
by
cylon-x
Browse files
Options
Downloads
Patches
Plain Diff
automatic formatting changes
parent
6b9830a5
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
test/analysis/flux_variability_analysis.jl
+36
-20
36 additions, 20 deletions
test/analysis/flux_variability_analysis.jl
with
36 additions
and
20 deletions
test/analysis/flux_variability_analysis.jl
+
36
−
20
View file @
96cc9bbb
...
...
@@ -12,7 +12,7 @@
fluxes
=
flux_variability_analysis
(
cp
,
[
2
],
optimizer
)
@test
size
(
fluxes
)
==
(
1
,
2
)
@test
isapprox
(
fluxes
,
[
2
2
],
atol
=
TEST_TOLERANCE
)
@test
isapprox
(
fluxes
,
[
2
2
],
atol
=
TEST_TOLERANCE
)
# a special testcase for slightly sub-optimal FVA (gamma<1)
cp
=
CoreModel
(
...
...
@@ -25,23 +25,35 @@
[
"m1"
],
)
fluxes
=
flux_variability_analysis
(
cp
,
optimizer
)
@test
isapprox
(
fluxes
,
[
1.0
1.0
0.0
0.0
-
1.0
-
1.0
],
atol
=
TEST_TOLERANCE
)
@test
isapprox
(
fluxes
,
[
1.0
1.0
0.0
0.0
-
1.0
-
1.0
],
atol
=
TEST_TOLERANCE
,
)
fluxes
=
flux_variability_analysis
(
cp
,
optimizer
;
bounds
=
gamma_bounds
(
0.5
))
@test
isapprox
(
fluxes
,
[
0.5
1.0
0.0
0.5
-
1.0
-
0.5
],
atol
=
TEST_TOLERANCE
)
@test
isapprox
(
fluxes
,
[
0.5
1.0
0.0
0.5
-
1.0
-
0.5
],
atol
=
TEST_TOLERANCE
,
)
fluxes
=
flux_variability_analysis
(
cp
,
optimizer
;
bounds
=
_
->
(
0
,
Inf
))
@test
isapprox
(
fluxes
,
[
0.0
1.0
0.0
1.0
-
1.0
0.0
],
atol
=
TEST_TOLERANCE
)
@test
isapprox
(
fluxes
,
[
0.0
1.0
0.0
1.0
-
1.0
0.0
],
atol
=
TEST_TOLERANCE
,
)
@test
isempty
(
flux_variability_analysis
(
cp
,
Vector
{
Int
}(),
Tulip
.
Optimizer
))
@test_throws
DomainError
flux_variability_analysis
(
cp
,
[
-
1
],
Tulip
.
Optimizer
)
...
...
@@ -52,10 +64,14 @@ end
cp
=
test_simpleLP
()
fluxes
=
flux_variability_analysis
(
cp
,
[
1
,
2
],
Tulip
.
Optimizer
;
workers
=
W
)
@test
isapprox
(
fluxes
,
[
1.0
1.0
2.0
2.0
],
atol
=
TEST_TOLERANCE
)
@test
isapprox
(
fluxes
,
[
1.0
1.0
2.0
2.0
],
atol
=
TEST_TOLERANCE
,
)
end
@testset
"Flux variability analysis with StandardModel"
begin
...
...
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