Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not properly identify seed nodes #34

Open
pekarj opened this issue Aug 3, 2020 · 2 comments
Open

Does not properly identify seed nodes #34

pekarj opened this issue Aug 3, 2020 · 2 comments

Comments

@pekarj
Copy link

pekarj commented Aug 3, 2020

FAVITES Version

1.2.0

Environment

Docker

Configuration File

toy_SAPHIRE.json.zip

Unexpected Behavior

I set up 20000 nodes fro the contact network, 1 seed "P" node, and 19999 susceptible "S" nodes, but FAVITES identified the network as having 20000 seed nodes, rather than 1.

Error message:

Performing transmission simulations...Traceback (most recent call last):
File "/FAVITES/run_favites.py", line 75, in
MF.modules['Driver'].run('/'.join(expanduser(abspath(argv[0])).split('/')[:-1]), ORIG_CONFIG)
File "/FAVITES/modules/Driver_Default.py", line 160, in run
t = MF.modules['TransmissionTimeSample'].sample_time()
File "/FAVITES/modules/TransmissionTimeSample_SAPHIREGEMF.py", line 64, in sample_time
return TransmissionTimeSample_SAAPPHIIREGEMF.sample_time()
File "/FAVITES/modules/TransmissionTimeSample_SAAPPHIIREGEMF.py", line 227, in sample_time
TransmissionTimeSample_SAAPPHIIREGEMF.prep_GEMF()
File "/FAVITES/modules/TransmissionTimeSample_SAAPPHIIREGEMF.py", line 137, in prep_GEMF
assert len(start_states['seed']) == len(GC.seed_nodes), "At time 0, P1+P2+I1+I2+A1+A2 = %d, but there are %d seed nodes. Fix saapphiire_freq_* parameters accordingly" % (len(start_states['seed']),len(GC.seed_nodes))
AssertionError: At time 0, P1+P2+I1+I2+A1+A2 = 20000, but there are 1 seed nodes. Fix saapphiire_freq_* parameters accordingly

@niemasd
Copy link
Owner

niemasd commented Aug 3, 2020

Ah yes, this was a bug I found earlier but haven't fixed yet. It's interpreting "1" as 100% rather than a count. Can you try putting the proportion as a fraction (i.e., 1/20000) for now? I need to fix this

@pekarj
Copy link
Author

pekarj commented Aug 3, 2020

Ah, okay. That change worked. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants