pypest / pyemu

python modules for model-independent uncertainty analyses, data-worth analyses, and interfacing with PEST(++)
BSD 3-Clause "New" or "Revised" License
174 stars 95 forks source link

Inequality constraints for parameters #417

Closed Daniel-Trung-Nguyen closed 1 year ago

Daniel-Trung-Nguyen commented 1 year ago

Hi, I know that parameters can be tied to the parent parameters. However, I am running into an issue with max/min parameters (e.g., maximum and minimum fixation rates). How do I ensure minimum parameter is always less than or equal to the maximum parameter? In other words, parameter inequality constraints. Many thanks, Daniel

jtwhite79 commented 1 year ago

The way I've seen this done usually is that you estimate the first par and a par that is the ratio of the second par to the first par. At runtime you can calc the value of the second par as the product of the first par and the ratio value. Then you can enforce your preferred condition with the bounds of the ratio parameter.

You could also add the par1-par2 diff as an observation and set the obsval as the preferred condition and penalize the objective function for violations.

Just a couple of options...probably more out there...

Daniel-Trung-Nguyen commented 1 year ago

@jtwhite79 Thanks for the prompt reply! Your suggestions were also what suggested by John Doherty. I've been working with John on a couple of soil carbon modelling projects at QUT. On a different note, do you have any experience with setting up PEST/PEST++ on AWS clusters? I know that PEST++ comes with the Panther parallel manager and it seems to work fine for multiprocessing on a single machine. However, I'd like to set things up on a cloud cluster to help boost up the expensive model simulation. Any help/advice would be highly appreciated. Many thanks, Trung

jtwhite79 commented 1 year ago

I know people have done the cloud/aws thing with pest++... @mnfienen and @cnicol-gwlogic are the ones who could comment with more details...

mnfienen commented 1 year ago

Hi @Daniel-Trung-Nguyen As @jtwhite79 said, I've been working on a cluster application on AWS that should be general. It's early stages but here's a link to the templates needed to get it running. It's early days, so reach out if you run into issues.

Also, it uses HTCondor. Finally, if you are not familiar with HTCondor, here's a trivial example to mess with. Good luck!

Daniel-Trung-Nguyen commented 1 year ago

@mnfienen, thanks a lot for sharing the information! Great implementation! P/S: the htcondor.yml link seems to be broken.

mnfienen commented 1 year ago

ahhh - good catch. We branched it into two different YML files (in the cloudformation folder). I'll get it fixed