Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369084 - Feature request: User should be able to disable population rewinding in StandardPopulationModel
Summary: Feature request: User should be able to disable population rewinding in Stand...
Status: RESOLVED FIXED
Alias: None
Product: STEM
Classification: Technology
Component: Core (show other bugs)
Version: 1.3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.3.1   Edit
Assignee: Stefan Edlund CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-19 09:39 EST by Christian Thoens CLA
Modified: 2012-03-13 16:48 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Thoens CLA 2012-01-19 09:39:56 EST
When the population size is saved in a graph (for example: built-in graphs or graphs imported from a pajek file), a valid year is also associated with the population size. If the start time of the scenario is different from the valid year, the StandardPopulationModel rewinds the population to the start time of the scenario based on birth and death rate. In some cases this leads to extreme population sizes. The user should be able to disable this rewinding, cause it would be a lot of work to ensure that the valid years for all population sizes equal the start time.
Comment 1 Stefan Edlund CLA 2012-01-19 13:00:18 EST
This is the feature we had planned for 1.3, but it's taken out. We will not do the population rewinding but instead replace it with a population re-scaler. This gives us the flexibility to re-scale the initial population by a constant factor and then use any kind of population model on top of it.

Assigning to me and planning for 1.3.1
Comment 2 Stefan Edlund CLA 2012-01-31 18:04:00 EST
I propose fixing this in multiple steps and simplifying several things at once.

First, I propose we do not force having a population model in the scenario to be able to model a disease. If the user creates a scenario with only a disease model, he/she must be aware that:

1. The background birth/death of the population is 0.
2. No migration will take place, even if the graph has migration edges in it.
3. No air transportation will be modeled.

So we would not go ahead and automatically create an auto-generated population model for a disease if one cannot be found like we do today.

Secondly, like Chris pointed out, changing the initial population size from the birth/death rate parameters and the date attached to the population data can be confusing to the user. We'll remove this code and instead replace it with a new "population re-scaler" decorator that changes the initial population number by any desired scaling factor before a disease model (or a population model) uses the number to initialize its own labels.

I'm wondering if it's necessary to create a new type of population re-scaler object in STEM, or if we can add it to one of the existing types of objects. Perhaps to the population initializers?
Comment 3 Christian Thoens CLA 2012-02-01 08:04:42 EST
Hi Stefan,

I agree on the idea to remove the auto-generated population models, but I wouldn't mind if scenarios without a population model don't work at all.

Regarding the population re-scaler, I think it makes sense to make it a child class of PopulationInitializer.

Best Regards,
Chris
Comment 4 Stefan Edlund CLA 2012-03-13 16:48:08 EDT
Fixed as follows:

1. Population is not re-scaled from the valid year / sequencer year, that code is taken out.

2. One parameter 'initialRescalingFactor' was added to the PopulationModel EMF class. The default value is 1. Use it to rescale the population data before starting a simulation.