You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(9/10-14/2025) Review pandas df only UCI, and Develop base class for native HSPF features, and ops model, and prototype looping. Present to steering committee.
Consider renaming classes to append "Handler": these have all been done as means of translating json/nested dataframes into objects
Start by adding a stub for each object component type we plan to have. Talked to Paul about getting them in via PR, with the understanding that no code gets implemented until a companion testing data set is there.
Add single library file for all op model objects
Talk to Paul: should we do separate lib file for handlers and executable @njit code?
(10/27-11/3/2025) Develop Facility model test
json includes: test matrix, flowby, equation and broadcast
(11/10-14/2025) Develop very basic classes for model overall execution (RCHRES, PERLND, IMPLND, COPY, GENER)
Classes will enable storing things like UCI parameters, timeseries references, state pointers, and other persistent data between timestep iterations which will improve performance by avoiding reloading each timestep.
Prototype classes for ops model components, with one generic class to overcome limit for passing in lists of objects:
Pass the objects to the existing exec scripts that can then choose which function to use to perform step(), to provide custom object handling (until @njit catches up to more flexible object orientation). See develop-hydrclass for examples
(YES) Are class properties faster than class named Dict references? (i.e. is self$volint = self$volt - (self$ks * self$roseff * self$delts) faster than self['state']['volint'] = self['state']['volt'] - (self['state']['ks'] * self['state']['roseff'] * self['state']['delts'])?
Can we store state as pandas slices, like if state['RCHRESR001'] contained ['OVOL'], ['IVOL'], ... and then we could at create set self.state = state['/RCHRESR001'] and then maths that we did in the loop would be like `self.state['IVOL'] = X' and that would auto write to
Create a testing class with 8 permutations (2 * ts reading/writing, 2* state reading/writing, 2 * execution)
is there a difference in speed for executing class methods versus passing class data to an external function?
NJIT main loop versus Python main loop revisited
consider performance impact of storing main objects such as RCHRES and PERLND in lists keyed according to a string,
Create a generic benchmarking script to include in tests
Enable generic object support for op models with op_components object holding ops
Either with step function that calls hard-wired component step functions based on comp settings
Or a separate list of processor objects for each type, and use numeric key to ID which type list to load from at execution time?
Could one of these objects contain a reference to the time series array for the given component, like each physical gets an object for it's properties, ie RCHRESR001 can live in an object with references to all its properties?
for testing, we can just create a associative array version of the existing step functions in very short order
IF-THEN special action with dynamic exec list modification
Plan & Implement IF-THEN turn on /off
Meet with Tim Cera to plan architecture
Add prototype handling of enable/disable spec-actions based on remote property value 0/1
This will be used for flow dependent AGWRC initial implementation
This will also allow subsequently testing of dataMatrix version of the AGWRC variation
@COBrogan
LATEST WORK STOP STEPS: respec#197 (comment)
Does a list of objects actually pass by reference?stateto enhance readability and usabilitystateintohsp2/state/folder, alter imports and do PRjit-able class that contains all of the multitude of state elementsdevelop-state-class: Reorganize Files and create STATEjitclass respec/HSPsquared#197state_ix,state_pathsetc. to reduce the number of arguments to functions.om_constant:develop-state-class: Reorganize Files and create STATEjitclass respec/HSPsquared#197 (comment)om_Equation:develop-state-class: Reorganize Files and create STATEjitclass respec/HSPsquared#197 (comment)state@njitand parser/handler functions for each existing set of objectsdevelop-else(or has Tim's changes fixed this)? Develop else respec/HSPsquared#190@njitcode?RQUAL_classwork done by Tim/Paul https://github.com/respec/HSPsquared/blob/develop/src/hsp2/hsp2/RQUAL_Class.pystep(), to provide custom object handling (until@njitcatches up to more flexible object orientation). Seedevelop-hydrclassfor examplesnjitclass for abstracting model execution #110RQUAL_classwork done by Tim/Paul https://github.com/respec/HSPsquared/blob/develop/src/hsp2/hsp2/RQUAL_Class.pyself$volint = self$volt - (self$ks * self$roseff * self$delts)faster thanself['state']['volint'] = self['state']['volt'] - (self['state']['ks'] * self['state']['roseff'] * self['state']['delts'])?self.state = state['/RCHRESR001']and then maths that we did in the loop would be like `self.state['IVOL'] = X' and that would auto write totestsnjitand non-njit) https://www.usenix.org/publications/loginonline/codon-python-compiler-updateop_componentsobject holding opsRCHRESR001can live in an object with references to all its properties?IF-THENspecial action with dynamic exec list modificationAGWRCinitial implementationdataMatrixversion of theAGWRCvariationHYDRfunction is priority, just to ensure that our OPS model and single step versions will work seamlessly.HSPFcode but can be streamlined into a single function? Or maybe a timing function and a ts loader?PERLND,IMPLND, andSEDTRN/ADCALCetc functions are lower priority, maybe add stubs