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
- :
- Get values from Minimize Vector

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-15-2014
05:40 AM

09-15-2014
05:40 AM

I've got a worksheet that minimises a function with two variables.

I'd like to get the minimised variables and re-input them into the function to find the final minimised value.

When I try to extract the variables from the Minimize vector it gives me different values to those found initially - see attached worksheet.

**Worksheet overview:**

The function (Fresmin) adds FLres and FHres absolutely.

Fresmin will be zero wherever a horizontal line crosses both curves in the graph.

I define a value for RLD and use Minimize to find the optimum value of RHD.

I extract the minimised values into a and b.

I've also created a simplified example at the bottom of the worksheet that does work correctly.

Can anybody explain why the former is not working? (It appears to be finding another solution as Fresmin is very small)

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

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

09-15-2014
06:21 AM

09-15-2014
06:21 AM

Dan Rose wrote:

I've got a worksheet that minimises a function with two variables.

I'd like to get the minimised variables and re-input them into the function to find the final minimised value.

When I try to extract the variables from the Minimize vector it gives me different values to those found initially - see attached worksheet.

Worksheet overview:The function (Fresmin) adds FLres and FHres absolutely.

Fresmin will be zero wherever a horizontal line crosses both curves in the graph.

I define a value for RLD and use Minimize to find the optimum value of RHD.

I extract the minimised values into a and b.

I've also created a simplified example at the bottom of the worksheet that does work correctly.

Can anybody explain why the former is not working? (It appears to be finding another solution as Fresmin is very small)

Thats because the first time you use a solve block with two constraints which are respected. BTW, its does not seem to make much sense to use R.LD to minimze when you want it to be fixed to 800 mm anyway.

Minimize (contrary to minerr, find, etc.) can be used either with a solve block or standalone. The second time you used it was standalone and neither R.LD=800mm is respected nor is R.HD between 150mm and 1000mm.

In the last example you used it standalone without any constraints in both cases and so you got the same results.

1 REPLY 1

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

09-15-2014
06:21 AM

09-15-2014
06:21 AM

Dan Rose wrote:

I've got a worksheet that minimises a function with two variables.

I'd like to get the minimised variables and re-input them into the function to find the final minimised value.

When I try to extract the variables from the Minimize vector it gives me different values to those found initially - see attached worksheet.

Worksheet overview:The function (Fresmin) adds FLres and FHres absolutely.

Fresmin will be zero wherever a horizontal line crosses both curves in the graph.

I define a value for RLD and use Minimize to find the optimum value of RHD.

I extract the minimised values into a and b.

I've also created a simplified example at the bottom of the worksheet that does work correctly.

Can anybody explain why the former is not working? (It appears to be finding another solution as Fresmin is very small)

Thats because the first time you use a solve block with two constraints which are respected. BTW, its does not seem to make much sense to use R.LD to minimze when you want it to be fixed to 800 mm anyway.

Minimize (contrary to minerr, find, etc.) can be used either with a solve block or standalone. The second time you used it was standalone and neither R.LD=800mm is respected nor is R.HD between 150mm and 1000mm.

In the last example you used it standalone without any constraints in both cases and so you got the same results.