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

Add "INVALID" termination condition #847

Open grumpyinca opened 11 months ago

grumpyinca commented 11 months ago

While unusual, it is possible for a search to return a result that is both invalid and feasible. For example, use the default compression spring start point, Fix Force_1 to 680 and run search. Other examples are possible.

As I believe that it makes no sense to declare an invalid design as feasible, I propose to add an additional termination condition: "INVALID". If a (search, seek or trade) termination produces an invalid design, "INVALID" should appear as the termination message. A similar message should also appear if the invalid design is a result of user input.

The termination message might be something like: "Search terminated after xxx iterations. This design is INVALID. Manual entry of Independent Variables with more reasonable values may be required. Use Help lookup "invalid" for additional detail."

Potentially, the INVALID termination message could also produce a tooltip with some of this text.

1fifoto commented 11 months ago

Requires model change by adding result.design_valid: true/false.

grumpyinca commented 11 months ago

Moving to Milestone 5.0. Changes to the model are not appropriate for a patch release.

The code in this branch is regarded as experimental / prototype. Other implementations are possible and could be considered.

At this time, changes to the model and associated migrate are implemented for compression spring but not the other design types.