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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Minimize function

CarlosRomero
14-Alexandrite

Minimize function

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!

1 ACCEPTED SOLUTION

Accepted Solutions

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

Werner_E_0-1610252210482.png

 

 

View solution in original post

12 REPLIES 12

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:

Werner_E_0-1610242990483.png

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.

Werner_E_1-1610243093092.png

Mathcad15 file attached.

 

 

 

CarlosRomero
14-Alexandrite
(To:Werner_E)

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)?CR_Min_90121.jpg

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

Werner_E_0-1610252210482.png

 

 

CarlosRomero
14-Alexandrite
(To:Werner_E)

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.


@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.

CarlosRomero
14-Alexandrite
(To:Werner_E)

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.

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

CarlosRomero
14-Alexandrite
(To:Werner_E)

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

Primero.png

Another post was:

Segundo.png

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.


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.

CarlosRomero
14-Alexandrite
(To:Werner_E)

"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.  

Can anybody give any further information?

Thanks.

Top Tags