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
601bc098
Unverified
Commit
601bc098
authored
3 years ago
by
cylon-x
Committed by
St. Elmo
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
automatic formatting changes
parent
468a7eda
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/analysis/sampling/hit_and_run.jl
+4
-3
4 additions, 3 deletions
src/analysis/sampling/hit_and_run.jl
with
4 additions
and
3 deletions
src/analysis/sampling/hit_and_run.jl
+
4
−
3
View file @
601bc098
...
...
@@ -71,11 +71,12 @@ function hit_and_run(
map
(
fetch
,
save_at
.
(
workers
,
:
ws
,
Ref
(
:
(
$
ws
))))
map
(
fetch
,
save_at
.
(
workers
,
:
lbs
,
Ref
(
:
(
$
lbs
))))
map
(
fetch
,
save_at
.
(
workers
,
:
ubs
,
Ref
(
:
(
$
ubs
))))
# do in parallel!
chains
=
dpmap
(
x
->
:
(
$
COBREXA
.
_serial_hit_and_run
(
ws
,
lbs
,
ubs
,
$
samplesize
,
$
keepevery
,
$
N
)),
CachingPool
(
workers
),
1
:
nchains
,
CachingPool
(
workers
),
1
:
nchains
,
)
# remove warmup points from workers
...
...
@@ -129,7 +130,7 @@ function _serial_hit_and_run(ws, lbs, ubs, samplesize, keepevery, N)
@warn
"Infeasible direction at iteration
$(n)
..."
continue
end
λ
=
rand
()
*
(
λmax
-
λmin
)
+
λmin
# random step size
current_point
.=
current_point
.+
λ
.*
direction
# will be feasible
...
...
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