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

Suppress Seek button on underspecified #802

Open grumpyinca opened 1 year ago

grumpyinca commented 1 year ago

Currently, all spring Startup designs are feasible and underspecified (under-constrained). Thus, on startup, the Seek button is displayed on the main page. If an evaluator clicks on the Seek button without supplying additional constraints, a trivial (and confusing!) result will be produced. For example, if the evaluator clicks on "Seek MIN Weight" the result will be a spring of near zero dimensions.

This situation is not desirable. Possible approaches to improve the current situation include suppressing display of the Seek button if:

  1. The current design is underspecified. One possible approach to determining the degree of under-specification is to estimate the number of degrees of freedom via the UML diagram.

or

  1. The user has not yet made some meaningful input in terms of specifying application requirements. For example, to Fix or constrain one or more variables. There may be implementation alternatives to retain the "state" of whether or not the user has made such meaningful input:
    • a global variable?
    • add a flag variable to the model / symbol table.
    • perhaps some sort of checksum-like approach can be used. For example, a checksum of all the enabled constraints and Fixes could be compared to a value that is pre-computed and stored as part of initialState. Hmmm ... this does not seem to improve on the previous idea.

In most cases, implementing such a feature means that the user will likely see the Search button displayed before ever seeing the Seek button.

grumpyinca commented 1 year ago

809 can use the features described here.