×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

making an automated optimization environment

making an automated optimization environment

making an automated optimization environment

(OP)
Hi;
I am working on optimizaton of composite pressure vessels and currently on the stacking sequence optimization.I have two design variables(fiber angle & layer thickness)and I want to optimize the weight.I prefer to use genetic algorithm for optimization and ansys for simulation.I am seeking a procedure to use genetic algrithm with ansys and make a loop beetween these two to obtain the optimum variables.any suggestion would be appreciated.

RE: making an automated optimization environment

You need to be able to run ansys from the command line, and then you need an outer loop that can build populations of models, run ansys, and then pull the results out of the ansys file so as to measure fitness.

I am doing a similar thing, and am using Scilab for the GA side. The reason for that is that I already have the GA coded up for another project, so the really tricky bit has been done.

Another option (for me) would be to use qbasic. Basically whatever you choose has to be very good at writing and reading  ascii files, the actual computational efficiency is not very important, although breeding generations can take quite a while in an interpreted language.

I have also written a GA algorithm in Excel VBA, but I don't fancy writing the external interface (Hmm, actually that is not a terrible idea).

You also need to think about genes. Thus far I haven't, each gene has controlled just one variable. This may not be optimal. Also you might want to include dominance and recessiveness. I have in one implementation, didn't bother in the other.

Basically, so long as you always keep the best performer from each generation into the next generation then the thing will probably work, even if you make mistakes elsewhere.







Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

RE: making an automated optimization environment

(OP)
Hi Greg Locock ;
Thanks.I would like to know more details on this subject.do you run the external loop from ansys command and how do you get and enterpret the new generation for ansys.have you ever done this with ansys & matlab.


Cheers

RE: making an automated optimization environment

No, I haven't done this with ansys, I am about to do it with another FEA program. You need to call ansys from the outer loop, not the other way round.

You have to build a fitness function, in my case an equation that simply links the deflection and the mass of the structure.

Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

RE: making an automated optimization environment

(OP)
I still have a keen interest in working in this area and would like to learn more about what others are doing. Are there samples of your work that can be shared? If there are other resources you can point me to would be appreciated.

Cheers
alleak

RE: making an automated optimization environment

If you google for it you will find lots of articles, and quite a lot of coding examples and tutorials.

I strongly suggest you develop your GA framework before taking the plunge with the FEA side, but, with care, it is not very much code in itself, about 100 lines or less.

Incidentally I checked in Excel and it looks like I can run the whole thing from that, using the VBA command 'Shell' to call the Perl script that runs the FEA.

This is neat, it means I can hold the genetic population on a worksheet, build the input file to another worksheet, write it out, run the FEA, import the results and assign a score. Then work through the entire population like that, and then do the GA bit.

Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources