mauriceling/dose

deployment schemes: [pre-defined] even deployment

mauriceling opened this issue · 2 comments

  1. Deployment scheme is to allocate organisms to a particular eco-cell before the simulation starts (before generation 1).
  2. Deployment schemes will be given as part of simulation parameters.
  3. We should have an All-in-one deployment scheme where the entire population gets evenly distributed across a set of eco-cells (to be defined by user). The designated eco-cells should have the same number of organisms if the number of organisms is divisible by the number of eco-cells without remainder.
  4. Even deployment scheme to have deployment_code=3.

Implemented deployment scheme: even deployment. Simulation reporting does not show changes despite implementation of even deployment.

  1. Entire population is distributed evenly among user-defined eco-cells.
  2. Ignores 'eco_cell_capacity' key in parameters and splits the population according to len(eco_cells).
  3. Currently unfit for deployments that return a remainder when divided evenly.

Bug regarding incorrect even location reporting now resolved. Problem was caused by genetic.py's Organism.clone(). Function does not properly deepcopy() the status dictionary of each organisms. It simply references all status dictionary of all organisms into one original dictionary. Reporting location now show the desired results according to even distribution to the cells. Was resolved by manually referencing each of the original organism to be cloned's status dictionary keys into the different clones. See genetic.py.

  1. Location status of every individual now reports even spread among the user-defined cells.
  2. Now fit to work for deployments that return a remainder when divided evenly. Entire even deployment scheme is rewritten, such that deployment of individuals iterate through the list of locations, making sure every individual get's a location.