473,396 Members | 1,892 Online

# 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.

Ariel
Jan 30 '08 #1
2 3825
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?
[..]
V
--
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.

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 thread has been closed and replies have been disabled. Please start a new discussion.