The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Matlab/Ansys Optimization with fmincon (Input variables not changing)
Replies: 5   Last Post: Apr 7, 2011 4:36 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Brian G

Posts: 1
Registered: 2/18/09
Matlab/Ansys Optimization with fmincon (Input variables not changing)
Posted: Feb 18, 2009 10:26 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I am currently working on getting matlab to run an ansys model, retrieve principal stresses, and feedback into a matlab optimizer, specifically fmincon. My issue is not one of communication of variables (everything seems to be passing well between the 2 programs), however, fmincon evaluates the objective function with the same design variables for every iteration. In other words, it takes my initial guess and uses it for every iteration as if it is not changing the input variables based upon the feedback it is receiving. I have the same problem regardless of the initial guess I make. If I make a guess outside of the upper and lower bounds I have set, fmincon will use the closest feasible points within the bounds. I have no constraints other than bounds on the design variables. My objective function calls an ansysfemcall function I wrote which appends the design variables into a
text file, calls ansys in batch mode to run the input file, ansys completes the analysis and writes the max stresses to more text files, then matlab reads the associated stress from the output files. In essence, you put the design variables in and get stresses out. The objective function takes the max stress and returns it to the optimizer.

I was having success when performing the optimization with only 1 variable using fminbnd. This has helped me narrow down the problem to matlab. I have also tried modifying fminimax and the same phenomenon occurs. When I bumped up the model complexity to more than one variable, I am forced to select a more appropriate optimizer. I have had success with fmincon in the past and am rather stumped as to why this is occurring. Any help would be appreciated. Thanks!

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.