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

Specific inputs can drive Objective Value to infinity #758

Closed grumpyinca closed 1 year ago

grumpyinca commented 1 year ago

Specific input values can cause the Objective Value to become infinity. If that happens, Search is unable to resolve the situation.

This may (or may not) be associated with values of Cycle_Life much less than 1 (for example, 1e-36). Wild Guess: Because it happens without constraints on Cycle_Life, the root cause may be related to the validity penalty.

Steps to recreate:

  1. Reload the app
  2. Using the default design, change the value of Wire_Dia to 0.05 (see Note below)
  3. Observe that the Objective Value is now reporting "infinity"

Also, observe conflicting information:

Note: Cycle_Life is reported as infinity with values of Wire_Dia in the range of 0.0485 and 0.0525 Values of Wire_Dia > 0.053 produce a very small value of Cycle_Life Values of Wire_Dia <0.048 produce a very large value of Cycle_Life

grumpyinca commented 1 year ago

Changes were made to the Cycle_Life calculation (compression, extension & torsion).

These changes are a bit of a fudge (using a hard-coded smallnum) to avoid the problematic behavior. A more insightful change should be considered in a future release.

1fifoto commented 1 year ago

Double update: Branch 758-4.4 created, Compression, Extension and Torsion eqnset.js copied from branch 758 and checked in to branch 758-4.4 (I did not check in version.js nor messageOfTheDay.md, I only checked in the three eqnset.js files), branch 758-4.4 merged into the latest master, which is for new 4.4 development.

1fifoto commented 1 year ago

Branch 758 merged into master-4.3.1, closing