kW-Labs / nmecr

An implementation of peer-reviewed energy data analysis algorithms for site-specific M&V
MIT License
24 stars 7 forks source link

Infinite loop fitting 5P Change Model #11

Closed LucaNicoliYT88 closed 2 years ago

LucaNicoliYT88 commented 2 years ago

Describe the bug When a 3PH model failed on a load curve, I had the following error ‘A 3PH model could not be computed. No breakpoint found’ and the object returned is a ‘NULL’ string. I can easily catch this checking the NULL string.

When the 5P model goes in loop, it is not able to end the process. The string ‘breakpoint estimate(s): 48.80786 76.08952’ is repeated and the process does not end. I need to kill manually. Is it possible to insert a max number of retries?

To Reproduce Pass script and data

Expected behavior Is it possible to insert a max number of retries and end the process? example_baseline_modified.zip

DrDAJump commented 2 years ago

update segment package?

LucaNicoliYT88 commented 2 years ago

what do you mean?

dexterluu commented 2 years ago

I tried reproducing your error with the data and script you provided but I wasn't getting the exact issue. During the model_with_CP step, the 5P model would not be able to find a breakpoint and would send back a warning because of that. It would then error out almost instantly when checking an IF statement because the criteria was checking against an NA value caused when the 5P model couldn't converge to breakpoints. If possible, could you provide more details to help me reproduce the issue?

dexterluu commented 2 years ago

Closing issue because I think the most recent release addresses the issue. It seemed to be due to a breakpoint temperature being too close to the outer temperature limits.