ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Looping a solver (https://www.excelbanter.com/excel-programming/281961-looping-solver.html)

Aaron Frick

Looping a solver
 
I have written a solver macro, but since the problem is
non linear it won't find the optimal solution unless I
run the macro 5 or 6 times. Can I have the macro
automatically run the solver n times?

Thank you for your help?

RWN

Looping a solver
 
Not really sure what you're doing but typically in these situations you'd
have it perform its iterations until some degree of precision is satisfied.

Something like;
Do Until <whatever your desired degree of precision is
<Your routine
Loop

You'd have to ensure that the precision can be found (or it'll go forever!).

If it's simply a case of having the routine execute n times then
For i = 1 to n
<Your Routine
Next


--
Regards;
Rob

Please reply to the NG, I'm already up to my eyeballs in Nigerian/South
African get rich letters
as well as "Microsoft Critical Updates" et al.




All times are GMT +1. The time now is 08:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com