468,513 Members | 1,834 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,513 developers. It's quick & easy.

Need Help - Constrained linear least square optimization C/C++ code

Hi
I need to find x that will minimize Ax-b=0, under the inequality
constraints Cx<d.
Actually the constraints in my problem are only upper and lower bounds
to x values.
x is 4x1 vector, A is about 100x4 (and b is of course 100x1(.
What is the appropriate algorithm?
Is there any C / C++ code available?

I succeeded solving the non-constrained problem with SVD, but some
times it give non-legal solution.

Thanks a lot in advance
Ariel
Jan 30 '08 #1
2 3265
na****@gmail.com wrote:
Hi
I need to find x that will minimize Ax-b=0, under the inequality
constraints Cx<d.
Actually the constraints in my problem are only upper and lower bounds
to x values.
x is 4x1 vector, A is about 100x4 (and b is of course 100x1(.
What is the appropriate algorithm?
Have you tried asking in 'comp.programming'? This is not a C++
language question.
Is there any C / C++ code available?
Maybe. Have you tried Google?
[..]
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jan 30 '08 #2
On Jan 30, 4:14*pm, "nav...@gmail.com" <nav...@gmail.comwrote:
Hi
I need to find x that will minimize Ax-b=0, under the inequality
constraints Cx<d.
Actually the constraints in my problem are only upper and lower bounds
to x values.
x is 4x1 vector, A is about 100x4 (and b is of course 100x1(.
What is the appropriate algorithm?
Is there any C / C++ code available?

I succeeded solving the non-constrained problem with SVD, but some
times it give non-legal solution.

Thanks a lot in advance
Ariel
Google LAPACK which is open source FORTRAN math library. It has
links to language wrappers like C if you don't want to do the
wrapper yourself.

Also, the Numerical Recipes book is a good general resource. It
references other libraries like the above both free and commercial.

HTH
Jan 30 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by MARTIN DAVIES | last post: by
55 posts views Thread by Alex | last post: by
15 posts views Thread by nikie | last post: by
9 posts views Thread by pic078 via AccessMonster.com | last post: by
6 posts views Thread by Explore_Imagination | last post: by
2 posts views Thread by Explore_Imagination | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.