Git Product home page Git Product logo

facs's People

Contributors

arabnejad avatar arindamsaha1507 avatar cspgdds avatar djgroen avatar imahmood786 avatar mzrghorbani avatar swise5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

facs's Issues

Full disease support for mutations

Mutations currently support changes in infection rate, but should contain complete disease definitions.

The infection function should weight between mutations, and select the specific disease properties depending on the disease being spread.

mutations/ strains do not have to remain identical between infection events, as that could add extra bias to the code (we seldom know where mutations are exactly introduced)

Improve household construction

Currently, households have members with a completely random age. This can lead to households with only children for example.

We should introduce a method to generate more realistic households.

My suggestion would be to make the first member 18+ by default, and then to change the probability of child / adult generation for the other household members to ensure that the distributed in demographics.csv is fully adhered to.

To do this, we need to probably split the eco.ages structure into two distributions, one for ages 0-17 and one for ages 18+.

Unable to plot location_plot while using FabSim

Hi Derek,

Here is the output that I get.

fabsim localhost facs_locationplot:klaipeda_localhost_1
[loading plugin] FabDummy ...
[loading plugin] FabCovid19 ...
Error: failed to import settings module ((<class 'SyntaxError'>, SyntaxError('invalid syntax', ('/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/plugins/FabCovid19/VVP/facs_VVP_ensemble_validation.py', 143, 22, ' facs_vvp_sif,\n')), <traceback object at 0x7f59956ff0c0>))
The FabCovid19 ensemble VVP functionalities are not imported as a result.
[Executing task] facs_locationplot
calling task facs_locationplot from plugin FabCovid19
╭───── New/Updated environment variables from FabCovid19 plugin ─────╮
│ env : │
│ --- facs_location : /home/arindam/Dropbox/Brunel/FACS/facs/facs/ │
│ +++ facs_location : /home/arindam/Dropbox/Brunel/FACS/facs │
│ env : │
│ +++ facs_args is a new added key │
│ env : │
│ +++ facs_validation is a new added key │
╰────────────────────────────────────────────────────────────────────╯
calling task locate_results_dir from plugin FabCovid19
╭─ New/Updated environment variables from FabCovid19 plugin ─╮
│ │
╰────────────────────────────────────────────────────────────╯
/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1 ['RUNS'] ['klaipeda-extend-lockdown-1.html']
/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS ['extend-lockdown-1-0.475_1', 'extend-lockdown-1-0.475_2', 'extend-lockdown-1-0.475_4', 'extend-lockdown-1-0.475_3', 'extend-lockdown-1-0.475_5'] []
/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475_1 ['covid_data'] ['covid_out_deaths_0.csv', 'env.log', 'covid_out_infections_0.csv', 'covid_out_recoveries_0.csv', 'out.csv', 'offices.csv', 'simsetting.csv', 'env.yml', 'covid_out_hospitalisations_0.csv', 'klaipeda_localhost_1_extend-lockdown-1-0.475_1.sh']
file found at: /home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475_1/covid_out_infections_0.csv
/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/fabsim/base/decorators.py:127: DtypeWarning: Columns (0,1,2) have mixed types.Specify dtype option on import or set low_memory=False.
return func(*args, **kwargs)
/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475_1/covid_data [] ['needs.csv', 'measures_uk.yml', 'age-distr.csv', 'vaccinations_example.yml', 'test_cases.csv', 'disease_covid19.yml', 'building_types_map.yml', 'klaipeda_buildings.csv']
/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475_2 ['covid_data'] ['covid_out_deaths_0.csv', 'env.log', 'covid_out_infections_0.csv', 'covid_out_recoveries_0.csv', 'out.csv', 'offices.csv', 'simsetting.csv', 'env.yml', 'covid_out_hospitalisations_0.csv', 'klaipeda_localhost_1_extend-lockdown-1-0.475_2.sh']
file found at: /home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475_2/covid_out_infections_0.csv
/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475_2/covid_data [] ['needs.csv', 'measures_uk.yml', 'age-distr.csv', 'vaccinations_example.yml', 'test_cases.csv', 'disease_covid19.yml', 'building_types_map.yml', 'klaipeda_buildings.csv']
/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475_4 ['covid_data'] ['covid_out_deaths_0.csv', 'env.log', 'covid_out_infections_0.csv', 'covid_out_recoveries_0.csv', 'out.csv', 'offices.csv', 'simsetting.csv', 'klaipeda_localhost_1_extend-lockdown-1-0.475_4.sh', 'env.yml', 'covid_out_hospitalisations_0.csv']
file found at: /home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475_4/covid_out_infections_0.csv
/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475_4/covid_data [] ['needs.csv', 'measures_uk.yml', 'age-distr.csv', 'vaccinations_example.yml', 'test_cases.csv', 'disease_covid19.yml', 'building_types_map.yml', 'klaipeda_buildings.csv']
/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475_3 ['covid_data'] ['covid_out_deaths_0.csv', 'env.log', 'covid_out_infections_0.csv', 'covid_out_recoveries_0.csv', 'out.csv', 'offices.csv', 'simsetting.csv', 'env.yml', 'covid_out_hospitalisations_0.csv', 'klaipeda_localhost_1_extend-lockdown-1-0.475_3.sh']
file found at: /home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475_3/covid_out_infections_0.csv
/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475_3/covid_data [] ['needs.csv', 'measures_uk.yml', 'age-distr.csv', 'vaccinations_example.yml', 'test_cases.csv', 'disease_covid19.yml', 'building_types_map.yml', 'klaipeda_buildings.csv']
/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475_5 ['covid_data'] ['covid_out_deaths_0.csv', 'env.log', 'covid_out_infections_0.csv', 'covid_out_recoveries_0.csv', 'out.csv', 'offices.csv', 'simsetting.csv', 'env.yml', 'covid_out_hospitalisations_0.csv', 'klaipeda_localhost_1_extend-lockdown-1-0.475_5.sh']
file found at: /home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475_5/covid_out_infections_0.csv
/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475_5/covid_data [] ['needs.csv', 'measures_uk.yml', 'age-distr.csv', 'vaccinations_example.yml', 'test_cases.csv', 'disease_covid19.yml', 'building_types_map.yml', 'klaipeda_buildings.csv']
Traceback (most recent call last):
File "/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/fabsim/bin/fabsim", line 46, in
sys.exit(fabsim_main.main())
File "/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/fabsim/base/fabsim_main.py", line 150, in main
env.exec_func(*env.task_args, **env.task_kwargs)
File "/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/fabsim/base/decorators.py", line 74, in wrapper
return func(*args, **kwargs)
File "/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/fabsim/base/decorators.py", line 127, in wrapper
return func(*args, **kwargs)
File "/home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/plugins/FabCovid19/visualisation/PlotByLocationType.py", line 63, in facs_locationplot
for i in range(pdf['time'].min(), pdf['time'].max()):
File "/home/arindam/.local/lib/python3.8/site-packages/pandas/core/generic.py", line 10827, in min
return NDFrame.min(self, axis, skipna, level, numeric_only, **kwargs)
File "/home/arindam/.local/lib/python3.8/site-packages/pandas/core/generic.py", line 10350, in min
return self._stat_function(
File "/home/arindam/.local/lib/python3.8/site-packages/pandas/core/generic.py", line 10345, in _stat_function
return self._reduce(
File "/home/arindam/.local/lib/python3.8/site-packages/pandas/core/series.py", line 4391, in _reduce
return op(delegate, skipna=skipna, **kwds)
File "/home/arindam/.local/lib/python3.8/site-packages/pandas/core/nanops.py", line 155, in f
result = alt(values, axis=axis, skipna=skipna, **kwds)
File "/home/arindam/.local/lib/python3.8/site-packages/pandas/core/nanops.py", line 410, in new_func
result = func(values, axis=axis, skipna=skipna, mask=mask, **kwargs)
File "/home/arindam/.local/lib/python3.8/site-packages/pandas/core/nanops.py", line 1017, in reduction
result = getattr(values, meth)(axis)
File "/home/arindam/.local/lib/python3.8/site-packages/numpy/core/_methods.py", line 44, in _amin
return umr_minimum(a, axis, None, out, keepdims, initial, where)
TypeError: '<=' not supported between instances of 'int' and 'str'

Add support for Measles modelling

@mzrghorbani I figured this could be a good issue to describe what you are adding or changing to FACS to support measles modelling? We can spin off separate issues here if you need support on the implementation of specific features (or selective disablement of other ones) :).

I am not attaching this to the FACS 2.0 milestone for now.

Workspace updates

Expose the following constants as runtime parameters in run.py and run_grid.py:

read_building_csv.read_building_csv(e, building_file, "{}/building_types_map.yml".format(data_dir), house_ratio=house_ratio, workspace=20, office_size=2500, household_size=household_size, work_participation_rate=0.5)

August revision feature list

In this issue, I am going to list all the things we would like to update in FACS this time around:

Visit probability more than 1

Perhaps the parameters need some tweaking but currently the visit probability in atleast some locations is more than one. This is caught by the error handler here:

raise ValueError("prob must be between 0 and 1")

which traces back to

elif probability(visit_probability):

Should I set it to 1 if it is more, or should we change the visit times?

Redesign hospital/clinic selection

Currently, persons go to the nearest medical facility when either visiting or being hospitalised. Sometimes these facilities are rather small, creating asymmetric effects.

My aim is to implement the following:

  • When at home: random chance to visit medical facility irrespective of type (some will visit hospitals, some clinics).
  • When hospitalised: exclude non-hospital medical facilities from selection.

Imran, what to do you think of this approach?

Introduce immune evasiveness

New mutant variants may have levels of immune evasiveness. Some people immune to one variant may not be immune to other variants.

Area of locations do not seem to have an effect on the infections

As a proof of concept, I tried to multiply each of the school areas by a thousand in the region of Kent (and named it test_kent) in FabCovid19 repo. The results did not change qualitatively. This is similar to the result reported by Tasin (@1702609) on Teams when he was working with Turkey.

What could be causing this issue?

Refactor base source code for FACS

As per Maziar's suggestion, we should split off the source code a bit such that facs.py is a bit less overwhelming in size, and the code is easier to navigate for people other than me ;).

Enable location-specific introduction of infections

This is a request to introduce new infections in a specific location or area in FACS.

@arindamsaha1507 before I proceed with designing and implementing this, could you give me a few ideas on how you would like to define this in a run.

E.g. would you like an input Yaml file in a certain format for this? Feel free to propose something :).

Campus modelling feature list (iteration 1)

  • change nearest visiting location routine, to do school by classes. (Derek)
  • change household size to 8, with reduced interaction frequencies. (Imran)
  • include accounting for outside visitors. (Imran, optional)
  • revise needs to include lecture / lab/ library? (Imran)
  • introduce teaching space concept. (Imran)
  • build in summer closure
  • doube-check and fix consistency of lockdown measures in campus setting.

Thorough cleanup

Continuation of issue #34

Go through the course and remove unused functions, reduce coupling etc.

Integration of Measles into FACS

Integration of Measles into FACS is a significant step towards enhancing our disease modeling capabilities. This integration will allow us to leverage Measles disease parameters and expand the scope of our simulations.

Goals and Objectives:

  1. Improve disease modeling in FACS.
  2. Expand our simulation capabilities.
  3. Enhance the accuracy of our results.
  4. Improved simulation validation.

Key Steps:

  1. Review disease parameters in Measles.
  2. Identify relevant parameters for integration.
  3. Design the integration process.
  4. Implement code changes.
  5. Thoroughly test and validate the integrated solution.
  6. Enhance the FACS validator to accommodate new parameters.

Timeline:

  • We'll aim to complete the initial review and parameter identification within the next two weeks.
  • Detailed design and coding phases will follow, with regular updates in this thread.

Responsibility:

I'll be overseeing this integration, and I'm open to collaboration. If you have specific expertise or insights to contribute, please feel free to join in.

Feedback and Collaboration:

Your feedback, suggestions, and concerns are invaluable. Let's keep the communication flowing in this thread as we make progress.

Runtime error introduced via one of the latest changes?

Hi Derek,

I have been getting this bug while running the code via FabSim:

RuntimeError:
local() encountered an error (return code 2)while executing 'ssh -Y -p 22 arindam@localhost '/bin/true || true && /home/arindam/Dropbox/Brunel/FACS/FabSim/FabSim3/localhost_exe/FabSim/results/klaipeda_localhost_1/RUNS/extend-lockdown-1-0.475/klaipeda_localhost_1_extend-lockdown-1-0.475.sh''

The exact command I ran was

fabsim localhost covid19_ensemble:cheshire_east,TS='extend-lockdown',TM='1',cores=1,replicas=1,ci_multipliers=0.3,simulation_period=100

I see this bug since the update to the code about 4 days ago.

facs mpi4py install issue

Dear Dr Derek Groen,
I am Shakir Bilal working at University of South Florida, In Tampa. Our group has been working on a C++ based ABM simulator and seeks to perform sensistvty analysis using the facs tool that you have developed. I have been working with Dr Arindam Saha while he was here at USF last year.

The current issue is with installing the facs on my machine with python 3.8.10 on Ubuntu. The installation process is stuck with the following two issues:
`

allgatherv.c: In function ‘MPI_Allgatherv’:
allgatherv.c:50:1: internal compiler error: in init_alias_analysis, at alias.c:3468
50 | }
| ^

allgatherv.c:50:1: internal compiler error: Segmentation fault
0x7fba204e408f ???
/build/glibc-wuryBv/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
gcc: internal compiler error: Segmentation fault signal terminated program cc1
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-9/README.Bugs for instructions.
make[2]: *** [Makefile:1876: allgatherv.lo] Error 1
make[2]: Leaving directory '/home/shakir/Downloads/openmpi-4.1.2/ompi/contrib/libompitrace'
make[1]: *** [Makefile:3555: all-recursive] Error 1
make[1]: Leaving directory '/home/shakir/Downloads/openmpi-4.1.2/ompi'
make: *** [Makefile:1901: all-recursive] Error 1
Collecting mpi4py
Using cached mpi4py-3.1.5.tar.gz (2.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: mpi4py
Building wheel for mpi4py (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for mpi4py (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [242 lines of output]

'
2)
'
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command '/home/shakir/sfw/MPICH/bin/mpicc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mpi4py
Failed to build mpi4py
ERROR: Could not build wheels for mpi4py, which is required to install pyproject.toml-based projects
'

Vaccine updates

  • Add vaccine_effect_time from YML as attribute in FACS.
  • Move hard-coded mutations to YML file.
  • Revise hospitalisation protection factor.
  • (add support for boosters)
  • Put vacc duration and immunity duration in YML files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.