Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Why minimize not work in this Mathcad Prime 3.0 sh...

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-06-2015
10:03 AM

08-06-2015
10:03 AM

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

10-08-2015
03:16 PM

10-08-2015
03:16 PM

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.

11 REPLIES 11

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-06-2015
01:32 PM

08-06-2015
01:32 PM

Re: Why minimize not work in this Mathcad Prime 3.0 sheet?

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

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-06-2015
01:49 PM

08-06-2015
01:49 PM

Re: Why minimize not work in this Mathcad Prime 3.0 sheet?

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

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-06-2015
01:52 PM

08-06-2015
01:52 PM

Re: Why minimize not work in this Mathcad Prime 3.0 sheet?

That worksheet has units.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-06-2015
01:59 PM

08-06-2015
01:59 PM

Re: Why minimize not work in this Mathcad Prime 3.0 sheet?

Richard Jackson wrote:

That worksheet has units.

Do you have the sheet without units?

Can we switch off units in Prime?

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-06-2015
01:57 PM

08-06-2015
01:57 PM

Re: Why minimize not work in this Mathcad Prime 3.0 sheet?

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

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-06-2015
03:01 PM

08-06-2015
03:01 PM

Re: Why minimize not work in this Mathcad Prime 3.0 sheet?

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

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-06-2015
03:58 PM

08-06-2015
03:58 PM

Re: Why minimize not work in this Mathcad Prime 3.0 sheet?

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.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-07-2015
03:10 AM

08-07-2015
03:10 AM

Re: Why minimize not work in this Mathcad Prime 3.0 sheet?

Yes! The Minerr works!

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

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

10-08-2015
03:16 PM

10-08-2015
03:16 PM

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.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

10-08-2015
03:34 PM

10-08-2015
03:34 PM

Re: Why minimize not work in this Mathcad Prime 3.0 sheet?

Thanks, Brent!

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-30-2015
09:49 AM

11-30-2015
09:49 AM

Re: Why minimize not work in this Mathcad Prime 3.0 sheet?

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!