thegrumpys / odop

Open Design Optimization Platform (ODOP) - Coil spring design app; mechanical springs; compression spring, extension spring, torsion spring
https://www.springdesignsoftware.org
MIT License
4 stars 5 forks source link

Improve response to search failure #848

Open grumpyinca opened 11 months ago

grumpyinca commented 11 months ago

Problem statement

Efforts associated with issue #847 have established that, depending on various factors, usually the start point, Search can fail to produce a feasible result even when a feasible result is known to be available. Frequently, it is an issue of extreme (and possibly invalid) values for the start point. Conceptually, if a singularity (divide by zero) lies on or near the path between the start point and the global minimum, the search is likely to converge on an infeasible local minimum rather than the desired feasible global minimum.

The current strategy is to execute a search even if the start point is invalid. Prior to integrating branch #871, there were no provisions beyond the alert facility to warn the user that starting a search from an invalid start point may encounter difficulties.

Reading Google Analytics and the usageLog shows that it is somewhat common for users to execute multiple consecutive searches with no forward progress. Some of this is normal. Users need to develop an understanding of the ability to gain additional progress. Indeed, re-executing Seek has a reasonable probability of an improved result because the estimate of the minimum of the merit function can improve. In other cases, multiple searches with no forward progress are likely an indication of user frustration and lack of understanding what to do next. For this situation, there is an opportunity to improve usability of the system.

Various strategies are available to work around these problems. This issue provides a branch to experiment with possible solutions.

Ideas for improvement:

If Search returns a NOT FEASIBLE result, multiple searches with differing start points could be executed with the best result presented to the user. The multiple searches could be based on a mix of the user's Fixes and constraints plus the default starting point. Also, for coil springs, it might be reasonable to try a search with wire diameter and number of coils in free status. If this produces a reasonable (CLOSE TO FEASIBLE or better) result, the user's Fix / constraint values for wire diameter and number of coils could be re-imposed. While not a guarantee, hopefully, this would mean subsequent searches start from a valid start point.

The user could be presented with a "Try harder?" option before embarking on a potentially time-consuming sequence of searches.

Rather than the explicitly presenting the "Try harder?" option, a search terminating without forward progress could automatically invoke a "try harder" sequence without user interaction.

The valid / invalid status at the start of a search could be retained for the duration of the search. Any search producing an invalid result could produce a custom termination message (or a pop-up) if the search began from an invalid start-point. Also, the user could be offered the opportunity to restore the pre-search state.

1fifoto commented 11 months ago

Please propose various strategies to be implemented and tested that make sense to you with your deep understanding of the model. I would assume the user would be given a list of choices as a pop-up and they would chose one to try.