|
4 | 4 | # ! ## See README.md for more information and use
|
5 | 5 | # !-----------------------------------------------------------------------------
|
6 | 6 | # ! SIS epidemic model algorithm based on the article
|
7 |
| -# ! "Optimized Gillespie algorithms for the efficient simulation of |
8 |
| -# ! Markovian epidemic processes on large and heterogeneous networks" |
| 7 | +# ! "Optimized Gillespie algorithms for the simulation of Markovian |
| 8 | +# ! epidemic processes on large and heterogeneous networks" |
9 | 9 | # ! Copyright (C) 2017 Wesley Cota, Silvio C. Ferreira
|
10 | 10 | # !
|
11 |
| -# ! Please cite the above cited paper as reference to our code. |
| 11 | +# ! Please cite the above cited paper (available at <http://wesleycota.com/ ) as reference |
| 12 | +# ! to our code. |
12 | 13 | # !
|
13 | 14 | # ! This program is free software: you can redistribute it and/or modify
|
14 | 15 | # ! it under the terms of the GNU General Public License as published by
|
|
25 | 26 | # !-----------------------------------------------------------------------------
|
26 | 27 | # ! Author : Wesley Cota
|
27 | 28 |
|
28 |
| -# ! Date : 10 Mar 2017 |
29 |
| -# ! Version : 0.2 |
| 29 | +# ! Date : 27 Mar 2017 |
| 30 | +# ! Version : 1.0 |
30 | 31 | # !-----------------------------------------------------------------------------
|
31 | 32 | # ! See README.md for more details
|
32 | 33 | # ! This code is available at <https://github.com/wcota/dynSIS-networkx>
|
|
37 | 38 | from math import log
|
38 | 39 |
|
39 | 40 | print( '################################################################################',
|
40 |
| - '### Optimized Gillespie algorithms for the efficient simulation of Markovian ###', |
| 41 | + '######### Optimized Gillespie algorithms for the simulation of Markovian ######', |
41 | 42 | '####### epidemic processes on large and heterogeneous networks: SIS-OGA. #######',
|
42 | 43 | '##============ Copyright (C) 2017 Wesley Cota, Silvio C. Ferreira ============##',
|
43 |
| - '##======= This code is available at <https://github.com/wcota/dynSIS>. =======##', |
| 44 | + '##================ Paper available at <http://wesleycota.com/ ================##', |
| 45 | + '##======= The codes are available at <https://github.com/wcota/dynSIS> =======##', |
44 | 46 | '##======== Please cite the above cited paper as reference to our code ========##',
|
45 | 47 | '##=== This code is under GNU General Public License. Please see README.md. ===##',
|
46 | 48 | '################################################################################',
|
@@ -142,7 +144,8 @@ def dyn_run(nw, fnOutput, dynp_sam, dynp_lb, dynp_tmax, dynp_pINI):
|
142 | 144 |
|
143 | 145 | # Write output file
|
144 | 146 | flOutput = open(fnOutput, 'wt')
|
145 |
| - print( '#@ Number of nodes: '+str(net_N), |
| 147 | + print( '## ***** Algorithm used: Optimized Gillespie Algorithm for SIS (SIS-OGA, NetworkX) *****', |
| 148 | + '#@ Number of nodes: '+str(net_N), |
146 | 149 | '#@ Number of edges: '+str(2*nw.number_of_edges()),
|
147 | 150 | '#@ Samples: '+str(dynp_sam),
|
148 | 151 | '#! Infection rate (lambda): '+str(dynp_lb),
|
|
0 commit comments