AmericasWater / awash

America's Water AWASH Model
GNU General Public License v3.0
4 stars 6 forks source link

WIP: Swapable urban demand data, with system to handle configuration #16

Closed jrising closed 8 years ago

jrising commented 8 years ago

This adds an UrbanDemand notebook and a system for reading demand data either from USGS or from a configurable file.

Maura, can you extend the UrbanDemand notebook with a description of the numbers and a map comparison (using the usmap function)? And can you also write a unit test of the data loading stuff, basically checking that it's pulling the right data into the right locations in the water demand vector and leaving the other data alone?

jrising commented 8 years ago

Merging this in, since I accidentally added a commit on agriculture documentation here too.

LaurelineJ commented 8 years ago

I am under the impression that there now only Maura's number in, and that there is not a configuration function to set the urban demand numbers back to the USGS ones. Also, does model.jl need to include PopulationDemand.jl systematically ?

jrising commented 8 years ago

That's not the intention. It should be that USGS numbers are the default-- whichever ones are in demand/simulation2010demanddata.csv. Only having the right values in the config file will give you Maura's numbers.

The PopulationDemand component needs to be loaded if Maura's numbers are configured our you'll get an error.

On Sep 26, 2016 10:50 PM, "LaurelineJ" notifications@github.com wrote:

I am under the impression that there now only Maura's number in, and that there is not a configuration function to set the urban demand numbers back to the USGS ones. Also, does model.jl need to include PopulationDemand.jl systematically ?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/AmericasWater/awash/pull/16#issuecomment-249753236, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjXePF44SMY9h9mW8PCjSpypecg6KtEks5quISOgaJpZM4JlCy5 .

LaurelineJ commented 8 years ago

Both Maria and I run into errors when we run simulate with the latest version on the master when initializing the UrbanDemand component.

On 27 September 2016 at 09:26, James Rising notifications@github.com wrote:

That's not the intention. It should be that USGS numbers are the default-- whichever ones are in demand/simulation2010demanddata.csv. Only having the right values in the config file will give you Maura's numbers.

The PopulationDemand component needs to be loaded if Maura's numbers are configured our you'll get an error.

  • James

On Sep 26, 2016 10:50 PM, "LaurelineJ" notifications@github.com wrote:

I am under the impression that there now only Maura's number in, and that there is not a configuration function to set the urban demand numbers back to the USGS ones. Also, does model.jl need to include PopulationDemand.jl systematically ?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/AmericasWater/awash/pull/16#issuecomment-249753236, or mute the thread https://github.com/notifications/unsubscribe-auth/ AAjXePF44SMY9h9mW8PCjSpypecg6KtEks5quISOgaJpZM4JlCy5 .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AmericasWater/awash/pull/16#issuecomment-249864164, or mute the thread https://github.com/notifications/unsubscribe-auth/APozsthaN9zE2K5eZCEOC828E2wp6H4Wks5quRmHgaJpZM4JlCy5 .

jrising commented 8 years ago

Can you try again? I just made three changes:

LaurelineJ commented 8 years ago

All is good now. There are still issues with balance and return balance not equal to 0 when performing optimization. I am working on this for the new version of the allocation problem on the "costmodel" branch (which is now running but has not been validated).

On 28 September 2016 at 11:07, James Rising notifications@github.com wrote:

Can you try again? I just made three changes:

  • Removed the urban == USGS check. This seems redundant.
  • Added PopulationDemand to the model script.
  • Checked for NAs in Maura's values, and dropped these rows.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AmericasWater/awash/pull/16#issuecomment-250195576, or mute the thread https://github.com/notifications/unsubscribe-auth/APozskQWhtckj6RhLdXFHcx2kPw4Oi_lks5quoK_gaJpZM4JlCy5 .