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
- :
- Minimize function

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

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

01-09-2021
05:30 PM

01-09-2021
05:30 PM

Hello,

Would anyone be so kind as to point out to me why the MInimize function does not work in this system of equations?

The answer it should give for the variables are: 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1.

Thank you very much!

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

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

01-09-2021
11:12 PM

01-09-2021
11:12 PM

> Can the objective function be worked with a single variable, w(x)?

Yes, but you would either have to write the full summation indices again as you did it in your original sheet or you will have to resort to the use of the submatrix command. I see no benefit in doing so.

You sure have already noticed that the changes you suggest still give a much better (lower) solution that the one you expect:

12 REPLIES 12

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

01-09-2021
08:45 PM

01-09-2021
08:45 PM

Re: Minimize function

There is something wrong either with your function or with your constraints.

The value of w can be made as low as you wish without violating the constraints! Thats the reason why Mathcad can't find a minimum - the error message about a variable not being defined is nonsense but its the only error message a solve block will ever throw.

The picture shows the elements of x and y which can be enlarged for a lower function value:

If I add an upper limit for the values in the vectors, the solve block gives a solution, but not the one you expected. So I guess you'll have to check your constraints.

Mathcad15 file attached.

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

01-09-2021
10:28 PM

01-09-2021
10:28 PM

Re: Minimize function

Thanks Werner for your answer.

Please make the change of the variable in the equation indicated.

One question:

Can the objective function be worked with a single variable, w(x)?

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

01-09-2021
11:12 PM

01-09-2021
11:12 PM

> Can the objective function be worked with a single variable, w(x)?

Yes, but you would either have to write the full summation indices again as you did it in your original sheet or you will have to resort to the use of the submatrix command. I see no benefit in doing so.

You sure have already noticed that the changes you suggest still give a much better (lower) solution that the one you expect:

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

01-10-2021
06:35 AM

01-10-2021
06:35 AM

Re: Minimize function

How can I use Richard’s simulated annealing function to minimize this problem and get a better solution?

Could you shed some light on this?

Big thanks.

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

01-10-2021
07:36 AM

01-10-2021
07:36 AM

Re: Minimize function

@CarlosRomero wrote:

How can I use Richard’s simulated annealing function to minimize this problem and get a better solution?

Could you shed some light on this?

Big thanks.

Why do you think that the solution minimize comes up with is bad and could be improved???

You suggested a "solution" for the minimum where w(x,y)=-15, Mathcads minimize found a minimum with w(x,y)=-104,25 which is definitely better.

To use Richards function I guess you will have to rewrite the objective function to deal with just one input vector.

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

01-10-2021
05:51 PM

01-10-2021
05:51 PM

Re: Minimize function

Thanks Werner. Mathcad's Minimize found a better minimum.

I have tried to find a minimum with Richard's simulated annealed function and it does not return the values that satisfy the constraints. I hope I have written the codes correctly.

I read some posts that evolutionary algorithms may can't find the global optimum,or take very long time.

Maybe it depends on the problem or the configuration of the evolutionary algorithm parameters.

Could you be so kind to review my worksheet?

Many thanks.

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

01-10-2021
06:27 PM

01-10-2021
06:27 PM

Re: Minimize function

As far as I see it, "Anneal" will try to find the global minimum but there is no way to apply constraints.

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

01-11-2021
04:36 PM

01-11-2021
04:36 PM

Re: Minimize function

One of the follow-up posts on these algorithms was that “simulated algorithm that is useful for the minimization of functions with multiple minima”.

Another post was:

where he asks "if you can develop a model that can be used to solve all the multi-objective parameter optimization cases" and was told to "see the attachment, MGA".

I quite agree with both statements.

In my opinion, "a model that can be used to solve all the multi-objective parameter optimization cases" is correct and both algorithms can do it.

I would like to know Valery’s and RichardJ’s comments about my worlsheet. If it can be improved.

Thank you very much.

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

01-11-2021
06:39 PM

01-11-2021
06:39 PM

Re: Minimize function

I would like to know Valery’s and RichardJ’s comments about my worlsheet. If it can be improved.

You may try to get their attention by mentioning the using @ followed by their nickname so they receive an automatic notification. Unfortunately Richard is no longer here very often - guess he switched over to SMath.

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

01-12-2021
07:49 AM

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

01-12-2021
07:54 AM

01-12-2021
07:54 AM

Re: Minimize function

"I would like to know Valery’s and RichardJ’s comments about my worksheet."

It's our great loss that RichardJ has stopped being a regular visitor to this site.

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

01-13-2021
04:58 PM

01-13-2021
04:58 PM

Re: Minimize function

Can anybody give any further information?

Thanks.