forum.alglib.net
http://forum.alglib.net/

Boundary constraints for nleq
http://forum.alglib.net/viewtopic.php?f=2&t=803
Page 1 of 1

Author:  Dantes [ Fri Mar 22, 2013 1:55 pm ]
Post subject:  Boundary constraints for nleq

Hi,

I'm trying to solve a system of nonlinear equations with nleq function of alglib (C#). Variables for the system are some concentrations so I need to set boundary constraints to limit their values from 0 to 1, but i cant find how to do this using nleq-class functions. Is there any possible way to implement this?

Thanks.

Author:  Sergey.Bochkanov [ Tue Mar 26, 2013 6:27 pm ]
Post subject:  Re: Boundary constraints for nleq

Nonlinear solver does not support this feature, unfortunately.

Author:  Dantes [ Wed Mar 27, 2013 9:01 am ]
Post subject:  Re: Boundary constraints for nleq

I have an idea to use minlm algorith for Abs values of functions so that I will minimize them to 0. This optimizer has an option to set contraints, but I'm concerned on performance reduce in this method. Is it a reasonable replacement in this situation?

Author:  Dantes [ Thu Mar 28, 2013 7:55 am ]
Post subject:  Re: Boundary constraints for nleq

I have one more question.. One of the variables cannot be constrained by a fixed value. This value changes with another variables. How should I avoid this complexity using minlm algorithm? Should I just use some limited value of this variable in function callback, so if function is called with value that cannot be used function return value for currently calculated constrain value? Or make function to just return some +INF value if its called with impossible variables? Or any other idea? Recalculate boundary constraints on each iteration?

Author:  Sergey.Bochkanov [ Thu Mar 28, 2013 1:25 pm ]
Post subject:  Re: Boundary constraints for nleq

"one of the variables cannot be constrained by a fixed value. This value changes with another variables."

It is called nonlinear constraint: x>=f(y), and usually you can't use boundary constrained code to solve such problems. You may try one of the variants proposed above by you, but all of them have some pitfalls, either subtle or clearly visible. Say, returning +INF will just force algorithm to stop as soon as it will meet the boundary of the feasible area - to stop at the boundary instead of moving along the boundary.

If you want, you may use Levenberg-Marquardt as underlying optimizer for penalty function / barrier function / Augmented Lagrangian method, it should work for you.

Author:  Dantes [ Fri Mar 29, 2013 9:37 am ]
Post subject:  Re: Boundary constraints for nleq

Ok, thank you very much for the answer.
I'll try to understand this penalty function method and determine is it applicable to my case.
Seems like it is the solution. For now I'm just worrying how the function will behave if the answer is very close to the boundary..

Thanks for help anyway.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/