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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Optimization with Genetic algorithm

ValeryOchkov
24-Ruby IV

Optimization with Genetic algorithm

Optimization with Genetic algorithm.

Try pls Mathcad Server with your test function f(x, y) - http://twtmas.mpei.ac.ru/mas/Worksheets/Minimum.mcd

and see the picture:

PS I would like to create a video but sorry - no time.

GenMeth.png

19 REPLIES 19

One more solution with genetic algorithm:

http://twt.mpei.ac.ru/ochkov/Mathcad_12/3_31_Genetic_1.png

Murarz
13-Aquamarine
(To:ValeryOchkov)

Hello!

Does this GA works for a 5-variable function? 

yes

I guess the question (implicitely) also was if you would be so kind and share the worksheet 🙂

For most of us the Mathcad Application Server pages aren't that helpful.

 

Sorry!

See please the attach!

Tell please us is all ok for your function!

We will see if  Murarz  will come back and is able to use and adopt your sheet to minimize his 5-argument function.

 

See this thread

https://community.ptc.com/t5/PTC-Mathcad/Optimization-problem-using-minimize-function/td-p/592435/jump-to/first-unread-message

for the function he has in mind.

Murarz
13-Aquamarine
(To:Werner_E)

Hello!! 

I am back ! I will try for sure, thank you 🙂

Thanks!

I am waiting your results! 

Murarz
13-Aquamarine
(To:ValeryOchkov)

Just one more question, xb, xe and yb, ye is the range (in this case for two variables) where the function looks for the minimum ?

xb, xe, yb and ye are for 2D problem.

There is a trick for 5D problem  too! 

Murarz
13-Aquamarine
(To:ValeryOchkov)

I know they are for 2D problem, just wanted to make sure what they stand for. I don't like tricks 😛

Murarz
13-Aquamarine
(To:Murarz)

Could you give me some clue? 🙂 I've been struggling with this and have no slightest idea where to even look for.

One method of the choking the minimum of the function of more than 2 argument:

x15.png 

Murarz
13-Aquamarine
(To:ValeryOchkov)

From the figure I see you use minimize function. Does the same applies to the MGA ? Would be a possibility to send the file in xmcd ?


@Murarz wrote:

From the figure I see you use minimize function. Does the same applies to the MGA ? Would be a possibility to send the file in xmcd ?


Sorry, I have not the xmcd-file. But you can create it yourself using the picture.

I can create it myself too - but...

Murarz
13-Aquamarine
(To:ValeryOchkov)

Thank you 🙂 But can I this trick of yours apply to the 5-variable function for the genetic algorithm? I mean how should I specify xx,xn in this case since as you said it is for a 2D problem? To be honest I don't understand what you have achieved with this.

Was it about fixing 3 variables from the minimize function, and looking for other two from the genetic algorithm ?

Murarz
13-Aquamarine
(To:Murarz)

Can I get any piece of advice how to convert this genetic alg for a 5 variable function ?  I am still dealing with this but with no sucess. 😞

x5.png

Murarz
13-Aquamarine
(To:ValeryOchkov)

Thanks for the reply. But I still can't connect the dots. I assume that it relates to the previous post with the guessed values and 2D plots while using the minimize function. But my point the whole time is in using this 5D function for the Genethic algorithm where there are many local minima. Will it work in this case too ? I mean how should I specify xe and xb ?

Top Tags