Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hello,
in acombined heat exchanger and solar colelctor problem only 21 of 1300 iterations end with a sucessful solve block. My idea is now to have two solve functions - one using minerr delivering start values followed by one using find using those start values.
Would that be a a good idea or do you have better ones?
many thanks in advance
I use some time the Solve strategy: find -> minimize/maximize.
Hello!
Could you give an example (worksheet)?
VladimirN. wrote:
Hello!
Could you give an example (worksheet)?
If the problem is with constraints, the function Find allows us to find gues values from which we can minimize or maximize an objective function.
Now things got worse, most of the times the solution has very small imaginary parts, which I have to remove....
Please upload a worksheet.
Mike
My idea is now to have two solve functions - one using minerr delivering start values followed by one using find using those start values.
That will not work. They use the same algorithm (Levenberg Marquardt). The principal difference is that minerr considers the problem solved if the error is minimized, whereas Find only condsiders it solved if the residuals are smaller than CTOL (they actually handle constraints in a different way too). Minerr will head to a local minimum, and then consider that "converged". Find will start in that local minmum, and will then realize it can't reduce the residuals, so it will report a failure to converge.
do you have better ones?
It is a very difficult problem, and there is no general solution to it (really - if you can figure out a universal way to make non-linear least squares always converge to the global minimum in a reasonable time you will probably get the Nobel prize for Mathematics!).. The best approach depends on the nature of the problem. Without knowing a lot more about the nature of the problem I can only suggest two approaches:
1) Find a linear approximation to the problem, which will have an exact solution. Use that solution as starting guesses.
2) If your iterations are in some sort of sequence, use the solution from one as the starting guesses for the next.
Superb explanation Richard.
Mike
Yes, as mentioned in another thread I remove dependencies on material or fluid temperatures from the solve blocks, I also might remove T^4 terms because of small importance first.
Cheers for the info Gerfried.
Mike