Skip to content

Commit

Permalink
Release 0.2.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathangeffen committed Aug 17, 2019
1 parent 0a8d3ea commit 300ec9d
Show file tree
Hide file tree
Showing 48 changed files with 685 additions and 406 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -236,18 +236,18 @@ OBJEXT = o
PACKAGE = faststi
PACKAGE_BUGREPORT = [email protected]
PACKAGE_NAME = faststi
PACKAGE_STRING = faststi 0.2.1
PACKAGE_STRING = faststi 0.2.2
PACKAGE_TARNAME = faststi
PACKAGE_URL =
PACKAGE_VERSION = 0.2.1
PACKAGE_VERSION = 0.2.2
PATH_SEPARATOR = :
PKG_CONFIG = /usr/bin/pkg-config
PKG_CONFIG_LIBDIR =
PKG_CONFIG_PATH =
SET_MAKE =
SHELL = /bin/bash
STRIP =
VERSION = 0.2.1
VERSION = 0.2.2
abs_builddir = /home/nathan/workspace/C/faststi
abs_srcdir = /home/nathan/workspace/C/faststi
abs_top_builddir = /home/nathan/workspace/C/faststi
Expand Down Expand Up @@ -312,6 +312,7 @@ EXTRA_DIST = simulations/examples/eg1.ini \
data/dataset_mortality_simple.csv \
data/dataset_rel.csv \
data/dataset_single.csv \
scripts/processResultsFile.py \
scripts/processResultsFile.R \
scripts/README

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([faststi], [0.2.1], [[email protected]])
AC_INIT([faststi], [0.2.2], [[email protected]])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
AC_PROG_CC
# CFLAGS+=" -std=c11 -Wall -Werror -pedantic"
Expand Down
Binary file modified docs/_build/doctrees/credits.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/events.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/example.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/extending.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/getstart.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/guide.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/improve.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/inputformats.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/installation.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/intro.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/license.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/outputformats.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/parameters.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/refs.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 8e18b96cacb840126c7c47821b7d27aa
config: c4f29da0b244d8f4b0022960ba4ead53
tags: 645f666f9bcd5a90fca523b33c5a78b7
86 changes: 3 additions & 83 deletions docs/_build/html/_sources/events.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -596,89 +596,9 @@ initial_infect_stage parameter are consistent with each other.
Dataset: dataset_infect_stage

This is quite a complicated dataset and is best understood by looking at the
commented example in the data directory called dataset_infect_stage.csv. For
convenience here it is:

.. code-block:: none
:linenos:
# Dataset used by _stage event (defined in fsti-events.c as fsti_event_stage)
#
# The first three columns are used for matching and correspond to agent fields
# or properties.
#
# The next six columns are instructions on how and when to change the stage.
#
# Columns:
#
# 1. infected - the infection stage of the agent (0 is uninfected)
# 2. treated - the treatment regimen of the agent. This particular file
# allows for 3 treatment regimens.
# 3. resistant - 0 if the agent is drug-susceptible to this treatment regimen
# 1 if the agent is drug-resistant to this treatment regimen
# 4. prob_stage_change - probability that the infection stage changes for
# this time step (1 day)
# 5. stage_incr - if a uniformly generated random number < prob_stage_change
# then change the infect property by this increment
# 6. prob_treatment_change - probability treatment changes
# 7. treatment_incr - if a uniformly rand number < prob_treatment_change
# then change the treatment property by this increment
# 8. prob_resistant - probability resistance status changes
# 9. resistant_incr - if a uniformly random number < prob_resistant_change
# change the resistant value by this amount
#
# Note the |6 after resistant_incr means that there are six columns at the end
# of each line that are not agent properties.
#
# Infection stages:;;;;;;;;
# 0 = uninfected;;;;;;;;
# 1 = virally suppressed (usually on treatment);;;;;;;;
# 2 = primary infection (highly infectious);;;;;;;;
# 3 = chronic infection;;;;;;;;
# 4 = Final stage;;;;;;;;
#
# HEADER ROW FOLLOWS
infected;treated;resistant;prob_stage_change;stage_incr;prob_treatment_change;treatment_incr;prob_resistant;resistant_incr|6
0;0;0;0;0;0;0;0;0
0;0;1;0;0;0;0;0;0
0;1;0;0;0;0;0;0;0
0;1;1;0;0;0;0;0;0
0;2;0;0;0;0;0;0;0
0;2;1;0;0;0;0;0;0
0;3;0;0;0;0;0;0;0
0;3;1;0;0;0;0;0;0
1;0;0;0.1;1;0.0001;1;0;0
1;0;1;0.1;1;0.0001;1;0;0
1;1;0;0.00001;1;0.00001;1;0.00001;1
1;1;1;0.1;1;0.0001;1;0;0
1;2;0;0.00001;1;0.00001;1;0.00001;1
1;2;1;0.1;1;0.0001;1;0;0
1;3;0;0.00001;1;0;0;0.0001;1
1;3;1;0.1;1;0;0;0;0
2;0;0;0.1;1;0.001;1;0;0
2;0;1;0.1;1;0.001;1;0;0
2;1;0;0.1;-1;0;0;0.0001;1
2;1;1;0.1;1;0.001;1;0;0
2;2;0;0.1;-1;0;0;0.0001;1
2;2;1;0.1;1;0.001;1;0;0
2;3;0;0.1;-1;0;0;0.0001;1
2;3;1;0.1;1;0;0;0;0
3;0;0;0.004;1;0.0001;1;0;0
3;0;1;0.001;1;0.0001;1;0;0
3;1;0;0.1;-1;0;0;0.0001;1
3;1;1;0.002;1;0.005;1;0;0
3;2;0;0.1;-1;0;0;0.0001;1
3;2;1;0.002;1;0.001;1;0;0
3;3;0;0.1;-1;0;0;0.0001;1
3;3;1;0.002;1;0;0;0;0
4;0;0;0;0;0.005;1;0;0
4;0;1;0;0;0.005;1;0;0
4;1;0;0.1;-1;0;0;0.0001;1
4;1;1;0;0;0.01;1;0;0
4;2;0;0.1;-1;0;0;0.0001;1
4;2;1;0;0;0.01;1;0;0
4;3;0;0.1;-1;0;0;0.0001;1
4;3;1;0;0;0;0;0;0
commented example in the data directory called dataset_infect_stage.csv. It's
also included for convenience in the parameter description of
:ref:`dataset_infect_stage_ref`.

*********
_coinfect
Expand Down
8 changes: 3 additions & 5 deletions docs/_build/html/_sources/installation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ On Ubuntu, Debian, Mint etc. this should do the trick: ::
sudo apt install build-essential libgsl-dev libglib2.0-dev


2. Download the |PROJECT| `archived distribution
<https://www.simhub.online/media/dist/faststi/latest.tar.gz>`_ and decompress
2. Download |PROJECT| from |DOWNLOAD| and decompress
it.

E.g. ::
E.g.

wget https://www.simhub.online/media/dist/faststi/latest.tar.gz
tar xzvf latest.tar.gz
|CODE_TO_DOWNLOAD|

This should create a directory called |DIRNAME| which contains the |PROJECT| files.

Expand Down
193 changes: 185 additions & 8 deletions docs/_build/html/_sources/parameters.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,159 @@ Examples: ::

dataset_gen_infect = dataset_gen_infect.csv


.. _dataset_infect_stage_ref:

********************
dataset_infect_stage
********************

Specifies the location of a dataset used to determine if an infected agent
should change the infection stage it is in.

Default: _no_op # i.e. there is no dataset file specified.

Examples: ::

dataset_gen_infect = dataset_gen_infect.csv

This is quite a complicated dataset and is best understood by looking at the
commented example in the data directory called dataset_infect_stage.csv. For
convenience here it is:

.. code-block:: none
:linenos:
# Dataset used by _stage event (defined in fsti-events.c as fsti_event_stage)
#
# The first three columns are used for matching and correspond to agent fields
# or properties.
#
# The next six columns are instructions on how and when to change the stage.
#
# Columns:
#
# 1. infected - the infection stage of the agent (0 is uninfected)
# 2. treated - the treatment regimen of the agent. This particular file
# allows for 3 treatment regimens.
# 3. resistant - 0 if the agent is drug-susceptible to this treatment regimen
# 1 if the agent is drug-resistant to this treatment regimen
# 4. prob_stage_change - probability that the infection stage changes for
# this time step (1 day)
# 5. stage_incr - if a uniformly generated random number < prob_stage_change
# then change the infect property by this increment
# 6. prob_treatment_change - probability treatment changes
# 7. treatment_incr - if a uniformly rand number < prob_treatment_change
# then change the treatment property by this increment
# 8. prob_resistant - probability resistance status changes
# 9. resistant_incr - if a uniformly random number < prob_resistant_change
# change the resistant value by this amount
#
# Note the |6 after resistant_incr means that there are six columns at the end
# of each line that are not agent properties.
#
# Infection stages:;;;;;;;;
# 0 = uninfected;;;;;;;;
# 1 = virally suppressed (usually on treatment);;;;;;;;
# 2 = primary infection (highly infectious);;;;;;;;
# 3 = chronic infection;;;;;;;;
# 4 = Final stage;;;;;;;;
#
# HEADER ROW FOLLOWS
infected;treated;resistant;prob_stage_change;stage_incr;prob_treatment_change;treatment_incr;prob_resistant;resistant_incr|6
0;0;0;0;0;0;0;0;0
0;0;1;0;0;0;0;0;0
0;1;0;0;0;0;0;0;0
0;1;1;0;0;0;0;0;0
0;2;0;0;0;0;0;0;0
0;2;1;0;0;0;0;0;0
0;3;0;0;0;0;0;0;0
0;3;1;0;0;0;0;0;0
1;0;0;0.1;1;0.0001;1;0;0
1;0;1;0.1;1;0.0001;1;0;0
1;1;0;0.00001;1;0.00001;1;0.00001;1
1;1;1;0.1;1;0.0001;1;0;0
1;2;0;0.00001;1;0.00001;1;0.00001;1
1;2;1;0.1;1;0.0001;1;0;0
1;3;0;0.00001;1;0;0;0.0001;1
1;3;1;0.1;1;0;0;0;0
2;0;0;0.1;1;0.001;1;0;0
2;0;1;0.1;1;0.001;1;0;0
2;1;0;0.1;-1;0;0;0.0001;1
2;1;1;0.1;1;0.001;1;0;0
2;2;0;0.1;-1;0;0;0.0001;1
2;2;1;0.1;1;0.001;1;0;0
2;3;0;0.1;-1;0;0;0.0001;1
2;3;1;0.1;1;0;0;0;0
3;0;0;0.004;1;0.0001;1;0;0
3;0;1;0.001;1;0.0001;1;0;0
3;1;0;0.1;-1;0;0;0.0001;1
3;1;1;0.002;1;0.005;1;0;0
3;2;0;0.1;-1;0;0;0.0001;1
3;2;1;0.002;1;0.001;1;0;0
3;3;0;0.1;-1;0;0;0.0001;1
3;3;1;0.002;1;0;0;0;0
4;0;0;0;0;0.005;1;0;0
4;0;1;0;0;0.005;1;0;0
4;1;0;0.1;-1;0;0;0.0001;1
4;1;1;0;0;0.01;1;0;0
4;2;0;0.1;-1;0;0;0.0001;1
4;2;1;0;0;0.01;1;0;0
4;3;0;0.1;-1;0;0;0.0001;1
4;3;1;0;0;0;0;0;0
*****************
dataset_mortality
*****************

Specifies the location of a dataset used to determine if an agent should die on
the current time step.

See the data/dataset_mortality.csv file for an example of this dataset.

Default: _no_op # i.e. there is no dataset file specified.

Examples: ::

dataset_mortality = dataset_mortality.csv


******************
dataset_rel_period
******************

Specifies the location of a dataset used to determine the length of time an
agent relationship should be.

This dataset requires two dependent variable columns: scale and shape, which are
used to draw a random number from a Weibull distribution for each agent in the
relationship. The values returned are the number of time steps (iterations). The
duration of the relationship is the mean of the two random numbers drawn.

Default: _no_op # i.e. there is no dataset file specified.

Examples: ::

dataset_rel_period = dataset_rel_period.csv


*********************
dataset_single_period
*********************

Specifies the location of a dataset used to determine the length of time an
agent should remain single.

This dataset requires two dependent variable columns: scale and shape, which are
used to draw a random number from a Weibull distribution for the agent. The
value drawn is the number of time steps the agent should remain single.

Default: _no_op # i.e. there is no dataset file specified.

Examples: ::

dataset_single_period = dataset_single_period.csv

.. _during_events_ref:

*************
Expand Down Expand Up @@ -532,25 +685,49 @@ Examples: ::

report_frequency = 365 # Report every 365 time steps.

********************
initial_infect_stage
********************

TO DO
When an agent is infected, this parameter determines the initial infection
stage.

Default: 2. In the default simulation provided by FastSTI, the agent infected
property of 1 implies it is on treatment. No one is on treatment when infected,
so 2 represents the primary infection stage, and this is therefore the default
value that initial_infect_stage is set to.

dataset_infect_stage; CSV file of values to determine when agent advances to next stage of infection; _no_op
Events used in: _infect

dataset_mortality; CSV file of values to determine agent deaths; _no_op
Example: ::

dataset_rel_period; CSV file of values to determine period agent is in relationship; _no_op
initial_infect_stage = 2

*******
match_k
*******

The value of k when using nearest-neighbour type agent matching algorithms. The
agent matching algorithm supplied with GroundUp (implemented by the
:ref:`rkpm_ref` event) chooses the best match for the current agent being
considered for matching in the mating pool from the k unmatched agents adjacent
to it.

dataset_single_period; CSV file of values to determine period agent is single; _no_op
If k is set to 1, this is random matching matching. If k is set larger than the
possible number of agents in the mating pool, then this is a kind of brute force
matching.

Default: 100 This is usually a good compromise value. The algorithm will execute
quickly and the agent selected will on average be a better match than 99% of the
remaining agents in the mating pool.

event_test_freq; Run test cases in test events every nth iteration; 100
Events used in: _rpkm

initial_infect_stage; When infected this is the integer to set infected to; 2
Example: ::

match_k = 300

match_k; Value for k when using matching algorithms; 100
TO DO

max_stage; Maximum infection stage (e.g. 6 for HIV 1=virally suppressed, 2=primary 3-6=WHO 1-4); 6

Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '0.2.1',
VERSION: '0.2.2',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/credits.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Credits &mdash; FastSTI 0.2.1 documentation</title>
<title>Credits &mdash; FastSTI 0.2.2 documentation</title>



Expand Down Expand Up @@ -88,7 +88,7 @@
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="getstart.html">Getting started</a></li>
<li class="toctree-l1"><a class="reference internal" href="guide.html">Tutorial: Creating a simulation</a></li>
<li class="toctree-l1"><a class="reference internal" href="guide.html">Tutorial: Creating simulations</a></li>
<li class="toctree-l1"><a class="reference internal" href="example.html">Interesting example</a></li>
<li class="toctree-l1"><a class="reference internal" href="inputformats.html">Input file formats</a></li>
<li class="toctree-l1"><a class="reference internal" href="outputformats.html">Output file formats</a></li>
Expand Down
Loading

0 comments on commit 300ec9d

Please sign in to comment.