Closed rburghol closed 4 years ago
@rburghol We do not have a check for these VAHydro facilities.
I'm wondering if it even needs to be its own function. Could we just include a check for the facility in the facility_REST() function?
Awesome. The only issue with facility_REST() is then we make that more multi-purpose than I would prefer, but I will try to make it straightforward and clean (and quick). Thanks for the quick review and algorithm thoughts.
This function also sets a number of data frames that are used later on, so don't think it can be disposed of just yet.
This has been moved into a separate function to be run before using the standard function to add an ECHO facility via REST.
@jdkleiner and @jdkleiner - the matched_switch() function is farther down the code, and it is intended to prevent duplicate facilities from a list of facilities that Morgan compiled that had certain matches -- i.e., all power plants and then a select group of larger commercial facilities (maybe others?).
Anyhow, I am thinking that this needs to be done before we create a facility, in other words, matched_switch() function should be called up in the create loop in lines 140-200 right before we call "facility_REST()".
Before I do that I wanted to ask: Did you all stick some other code in there that already checks this list before creating a facility?