How can I stop OpenMDAO evaluating at a given location early
Depending on your setup, you can raise an error inside the component that will kill the run. They you just change the input and start up the next run. Alternately, modify your wrapper for the subsequent code so that if it sees a NAN it skips running and just reports a garbage number thats easily identifiable.
I am using OpenMDAO 1.7.3 for an optimization problem on a map.
My parameters are the coordinates on this map. The first thing I do is interpolating the height at this location from a map in one component. Then some more complex calculations follow in other components.
If OpenMDAO chooses a location outside the boundaries of the map I will get a height of NaN. I already know that the rest of there is no additional information to be gained from this optimization step. How can I make OpenMDAO move on to the next evaluation point as soon before doing the more complex calculations?
In my case the other calculations (in an external program) will even fail if they encounter a NaN, so I have to check the value before calling them in each of the components and assign NaN outputs for each of them. Is there a better way to do that?