psrc / urbansim2

3 stars 0 forks source link

Make the function more modular #176

Open hanase opened 5 years ago

hanase commented 5 years ago

@stefancoe - Could we make the feature of meeting capacity independent of the sampling? We will need the capacity feature in the allocation mode, but there we do not care about the stratified sampling. Thanks! https://github.com/psrc/urbansim2/blob/66a9c604f0624001e6115f8f621f59d68ac6f2bd/psrc_urbansim/dcm_weighted_sampling.py#L79

stefancoe commented 5 years ago

Hana, I have been digging into this and was going to create a re-simulate function in psrc_urbansim.utils, but utils.lcm_simulate (which is in urbansim_defaults) does not return anything. So the items one would need to re-simulate, such as the probabilities and the samples/alternatives, are not available. And we don't want to change UDST's code...

So I am thinking about making dcm_weighted_sampling more modular (which is perhaps what you meant) to handle more of PSRC's special cases and not just sampling. So change the name of this module and add functionality like the ability to re-simulate overfull buildings (but still call udst's dcm.predict methods if sampling is not needed).