Skip to content

Commit

Permalink
Added risk to list of searchable agent properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathangeffen committed Sep 1, 2019
1 parent 1e971d7 commit 17c97b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/fsti-defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,14 @@ unsigned total_partners;

#ifndef FSTI_AGENT_PRINT_CSV_HEADER
#define FSTI_AGENT_PRINT_CSV_HEADER(file_handle, delim) \
fprintf(file_handle, "%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s\n", \
fprintf(file_handle, "%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s\n", \
"sim", delim, \
"date", delim, \
"id", delim, \
"age", delim, \
"sex", delim, \
"sex_preferred", delim, \
"risk", delim, \
"infected", delim, \
"treated", delim, \
"resistant", delim, \
Expand Down Expand Up @@ -115,13 +116,14 @@ unsigned total_partners;
simulation->time_step, \
_relchange_date); \
fprintf(simulation->agents_output_file, \
"%u%c%s%c%u%c%u%c%u%c%u%c%u%c%u%c%u%c%s%c%ld%c%s\n", \
"%u%c%s%c%u%c%u%c%u%c%u%c%u%c%u%c%u%c%u%c%s%c%ld%c%s\n", \
simulation->sim_number, delim, \
_current_date, delim, \
agent->id, delim, \
fsti_time_in_years(agent->age), delim, \
(unsigned) agent->sex, delim, \
(unsigned) agent->sex_preferred, delim, \
(unsigned) agent->risk, delim, \
agent->infected, delim, \
(unsigned) agent->treated, delim, \
(unsigned) agent->resistant, delim, \
Expand Down Expand Up @@ -237,6 +239,7 @@ unsigned total_partners;
{"relchange_3", offsetof(struct fsti_agent, relchange[3]), \
UINT, fsti_to_uint32_t}, \
FSTI_AGENT_ELEM_ENTRY(resistant), \
FSTI_AGENT_ELEM_ENTRY(risk), \
FSTI_AGENT_ELEM_ENTRY(sex), \
FSTI_AGENT_ELEM_ENTRY(sex_preferred), \
FSTI_AGENT_ELEM_ENTRY(treated) \
Expand Down
2 changes: 1 addition & 1 deletion src/fsti-userdefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/*
* Users who wish to extend FastSTI code are encouraged to modify this file and
* fsti-userdefs.h.
* It will not modified in FastSTI upgrades.
* It will not be modified in FastSTI upgrades.
*
*/

Expand Down

0 comments on commit 17c97b9

Please sign in to comment.