Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MarkovProcesses.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bentriou Mahmoud
MarkovProcesses.jl
Commits
9e57c693
Commit
9e57c693
authored
4 years ago
by
Bentriou Mahmoud
Browse files
Options
Downloads
Patches
Plain Diff
new model intracellular viral infection + smc_chernoff
parent
40cf91a4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
core/MarkovProcesses.jl
+1
-1
1 addition, 1 deletion
core/MarkovProcesses.jl
core/model.jl
+7
-0
7 additions, 0 deletions
core/model.jl
models/intracellular_viral_infection.jl
+16
-0
16 additions, 0 deletions
models/intracellular_viral_infection.jl
with
24 additions
and
1 deletion
core/MarkovProcesses.jl
+
1
−
1
View file @
9e57c693
...
@@ -29,7 +29,7 @@ export get_index, get_value, length_var, isaccepted
...
@@ -29,7 +29,7 @@ export get_index, get_value, length_var, isaccepted
# Model related methods
# Model related methods
export
simulate
,
volatile_simulate
export
simulate
,
volatile_simulate
export
distribute_mean_value_lha
,
mean_value_lha
,
distribute_prob_accept_lha
,
probability_var_value_lha
export
distribute_mean_value_lha
,
mean_value_lha
,
distribute_prob_accept_lha
,
probability_var_value_lha
,
smc_chernoff
export
set_param!
,
set_x0!
,
set_time_bound!
,
set_observed_var!
,
observe_all!
export
set_param!
,
set_x0!
,
set_time_bound!
,
set_observed_var!
,
observe_all!
export
get_param
,
get_x0
,
getproperty
,
get_proba_model
,
get_observed_var
export
get_param
,
get_x0
,
getproperty
,
get_proba_model
,
get_observed_var
export
isbounded
,
isaccepted
,
check_consistency
export
isbounded
,
isaccepted
,
check_consistency
...
...
This diff is collapsed.
Click to expand it.
core/model.jl
+
7
−
0
View file @
9e57c693
...
@@ -402,6 +402,13 @@ function probability_var_value_lha(sm::SynchronizedModel, nbr_sim::Int;
...
@@ -402,6 +402,13 @@ function probability_var_value_lha(sm::SynchronizedModel, nbr_sim::Int;
return
sum_val
/
nbr_sim
return
sum_val
/
nbr_sim
end
end
function
smc_chernoff
(
sm
::
SynchronizedModel
;
approx
::
Float64
=
0.01
,
confidence
::
Float64
=
0.99
)
@assert
sm
.
automaton
.
name
in
[
"F property"
,
"G property"
,
"G and F property"
]
nbr_sim
=
log
(
2
/
(
1
-
confidence
))
/
(
2
*
approx
^
2
)
nbr_sim
=
convert
(
Int
,
trunc
(
nbr_sim
)
+
1
)
@show
nbr_sim
return
probability_var_value_lha
(
sm
,
nbr_sim
)
end
function
distribute_prob_accept_lha
(
sm
::
SynchronizedModel
,
nbr_sim
::
Int
)
function
distribute_prob_accept_lha
(
sm
::
SynchronizedModel
,
nbr_sim
::
Int
)
sum_val
=
@distributed
(
+
)
for
i
=
1
:
nbr_sim
sum_val
=
@distributed
(
+
)
for
i
=
1
:
nbr_sim
...
...
This diff is collapsed.
Click to expand it.
models/intracellular_viral_infection.jl
0 → 100644
+
16
−
0
View file @
9e57c693
intracellular_viral_infection
=
@network_model
begin
R1
:
(
N
+
T
=>
G
+
T
,
k1
*
T
*
cn
)
R2
:
(
N
+
G
=>
T
,
k2
*
G
*
cn
)
R3
:
(
N
+
A
+
T
=>
S
+
T
,
k3
*
T
*
cn
*
ca
)
R4
:
(
T
=>
∅
,
k4
*
T
)
R5
:
(
S
=>
∅
,
k5
*
S
)
R6
:
(
G
+
S
=>
V
,
k6
*
G
*
S
)
end
"Intracellular viral infection pkg"
set_x0!
(
intracellular_viral_infection
,
[
:
N
,
:
A
,
:
G
,
:
T
,
:
S
,
:
V
],
[
10000
,
10000
,
0
,
1
,
0
,
0
])
set_param!
(
intracellular_viral_infection
,
[
:
cn
,
:
ca
,
:
k1
,
:
k2
,
:
k3
,
:
k4
,
:
k5
,
:
k6
],
[
1.0
,
1.0
,
1.0
,
0.025
,
100.0
,
0.25
,
0.2
,
7.5E-6
])
set_time_bound!
(
intracellular_viral_infection
,
200.0
)
export
intracellular_viral_infection
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