cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Why minimize not work in this Mathcad Prime 3.0 sheet?

ValeryOchkov
24-Ruby IV

Why minimize not work in this Mathcad Prime 3.0 sheet?

In Mathcad 15 (without units) all was OK!

Please see the attach!

ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

11 REPLIES 11

A bug I guess. If you remove the units it works.

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

That worksheet has units.

Richard Jackson wrote:

That worksheet has units.

Do you have the sheet without units?

Can we switch off units in Prime?

Here's a worksheet with no units. Actually, although a and b now change, c and d still don't.

But the Minerr function works with units - see please the attach

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.

Yes! The Minerr works!

But I must change guess values - see please last 4 plots in attach!

minerr.png

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.

Thanks, Brent!

RichardJ
19-Tanzanite
(To:bedmonds)

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!

Announcements

Top Tags