Why minimize not work in this Mathcad Prime 3.0 sheet?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Why minimize not work in this Mathcad Prime 3.0 sheet?
- Labels:
-
Other
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Valery, et al - our engine team has spent some time looking at this worksheet, and we believe the difference in results between united and dimensionless formulations of the problem are a consequence of rescaling the parameters in the problem. The dimensionless problem is cast in terms of # of years and # of inverse miles rather than SI base units (# of seconds and # of inverse meters). Had the dimensionless version of the problem been cast in terms of SI base units they would have gotten answers equivalent to the results using units. The difference between minerr and minimize is a consequence of different stopping conditions which substantially affects the result because of the mismatched scales of the parameters.
Please see notes in the attached worksheet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
A bug I guess. If you remove the units it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Richard Jackson wrote:
A bug I guess. If you remove the units it works.
Thanks, but I have checked it - a bug is a bug - see please the attach
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That worksheet has units.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Richard Jackson wrote:
That worksheet has units.
Do you have the sheet without units?
Can we switch off units in Prime?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here's a worksheet with no units. Actually, although a and b now change, c and d still don't.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
But the Minerr function works with units - see please the attach
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
So it's a bug in minimize. Or the new solver is just a terrible solver. Minerr uses the old but very good LM algorithm, which is the same as the default algorithm in MC15. Minimize and maximize use the new KNITRO solver. That's touted by Ziena, and therefore by PTC, as the latest and greatest gee-whiz algorithm but perhaps that's more hype than reality.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Yes! The Minerr works!
But I must change guess values - see please last 4 plots in attach!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Valery, et al - our engine team has spent some time looking at this worksheet, and we believe the difference in results between united and dimensionless formulations of the problem are a consequence of rescaling the parameters in the problem. The dimensionless problem is cast in terms of # of years and # of inverse miles rather than SI base units (# of seconds and # of inverse meters). Had the dimensionless version of the problem been cast in terms of SI base units they would have gotten answers equivalent to the results using units. The difference between minerr and minimize is a consequence of different stopping conditions which substantially affects the result because of the mismatched scales of the parameters.
Please see notes in the attached worksheet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks, Brent!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Revisiting this discussion, this issue of scaling makes a lot of sense. However, it is possible to scale the parameters in a generic minimization to avoid these numerical problems. In fact, the LM algorithm does exactly that, which may well be why it works but the Knitro solvers fail. I've attached the original LM paper, which discusses this scaling (starting on p 436). The extra notes tacked onto the end of the paper are mine (from about 25 years ago!), and also relate to the scaling of the space.
The LM algorithm may be more than 50 years old, but it's very good. Newer is not always better!
