Skip to main content

Case Generator Montecarlo

· 2 min read

Over the years I have often perturbed a design or model or strategy for sensitivity analysis and optimization. The typical situation is that I have a model for something like an optical system, a heat exchanger, or a nuclear core, and the model has a bunch of knobs and inputs, and bunch of outputs including value functions to optimize or observe. I then have to run various extreme cases or choose a good set of inputs to optimize one of the outputs. It's always the same thing and it made sense to standardize it so I don't have to keep copy pasting code.

1 Example of 2d sensitivity.
Figure 1 Example of 2d sensitivity.
1 Example of 2d sensitivity.

casegenmc is python package to organize models, generate and run cases, estimate uncertainty, and optimize. There are ways to study the statistical metrics of the studies, e.g. value functions the incorporate the uncertainty.It also has some decent plotting capability. The source is here and it is pip installable and bit a buggy: https://github.com/lvenneri/casegenmc

2 Example uncertainty estimate.
Figure 2 Example uncertainty estimate.
2 Example uncertainty estimate.

It includes some convenience function for using optimization algorithms available from other packages. I have been using NEORL recently, a package my advisor and my friend have contributed to, which packages several evolutionary algorithms in one place.