BayAreaMetro / bayarea_urbansim

Bay Area Version of the UrbanSim Model
http://bayareametro.github.io/bayarea_urbansim
13 stars 11 forks source link

Allow separate square feet adjusters to be applied independently #348

Open akselx opened 9 months ago

akselx commented 9 months ago

It is possible that the run_setup.yaml file contains both run_telecommute_strategy and sqft_per_job_adjusters flags set as True. However, the code is currently set up such that base sqft adjusters (sqft_per_job_adjusters) are currently only applied if the flag run_telecommute_strategy in run_setup.yaml is set to False:

https://github.com/BayAreaMetro/bayarea_urbansim/blob/098d42f56a365f39d6183dd6645fc1c20d124bda/baus/variables.py#L160

Otherwise the following elif statement is not evaluated - ideally these could be multiplicative - with a base adjustment, and then the strategy adjustment - though it depends on whether the telecommute adjustments are all inclusive - bundling in the base adjustments on the data side.

https://github.com/BayAreaMetro/bayarea_urbansim/blob/098d42f56a365f39d6183dd6645fc1c20d124bda/baus/variables.py#L163

akselx commented 9 months ago

@theocharides let me know if you think this is a general issue or just one related to my use case for leveraging sqft_per_job_adjusters for the exogenous adjustments.

theocharides commented 9 months ago

Hi @akselx - I think I need more code comments here to start, since it's not very straightforward. Also when I last looked at this I thought I saw a typo where the code comments for these lines are swapped.

The idea was that either telecommute rates get applied to future years, or the default rate gets applied, but in any case you can see it in the inputs based on what's turned on in run_setup.yaml without doing multiplication. But I see how that means you can't apply both at the same time without embedding the defaults in the future years.