Optimization problem using external program
Show older comments
Hello everyone,
I am currently dealing with an optimization problem in which I have an objective function to minimize and its result (number) is obtained from a simulation program.
Current progress is that I wrote a script that will automatically feed ("some") numbers in to variables needed to run simulation and obtain the result. After calling an optimization algorithm, it starts doing its own thing, generates variables in each step and calculating the objective function (in which I would like to put results from simulation with generated variables from corresponding step).
What I'm interested in is:
- Is it possible for an algorithm to generate variables for one step only (exit the optimization algorithm), that I will put in the simulation program and calculate objective function, and put this in the loop.
- Should this be done by OutputFunction?
- If there is a better way to do it, I'd love to hear
I hope I wrote it clear enough for you to understand.
Best regards,
Mario
Accepted Answer
More Answers (0)
Categories
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!