Minimize/Maximize a Monte Carlo
- June 18, 2018
- 2 replies
- 3116 views
I'd like to use maximize or minimize in combination with a Monte Carlo analysis. I made a simple model, and it works. Usually. However, sometimes it returns something right around my guess value. I'm thinking I'm at the mercy of the numerics of the solve block. It takes a small step in one direction, the unlucky monte carlo says it's the wrong direction and it never goes that way again. Anyone have any tricks that would help it converge to the proper solution more often?
Attached example is pretty simple. It's random points thrown in a square with a circle at the center. It changes the size of the circle to max/min the number of points inside. So, it should solve either R=1 for maximize or R=0.5 for minimize (per the constraints). I get the correct answer about 80% of the time, but I get the guess value the remainder. I understand that a monte carlo is never perfect, but I was not expected this many wrong answers. Doesn't seem to improve with a large number of random points either. 4.0 attached.


