Forums: » Register « |  Free Tools |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |

New Free Tools on Dev Shed!

#1
January 26th, 2013, 07:10 AM
 prax1980
Registered User

Join Date: Jan 2013
Posts: 3
Time spent in forums: 15 m 53 sec
Reputation Power: 0

I want to solve a non linear program specifically quadratic programming in C code. Kindly assist me how to solve the same.

#2
January 26th, 2013, 07:21 AM
 salem
Contributed User

Join Date: Jun 2005
Posts: 4,261
Time spent in forums: 2 Months 4 Weeks 1 Day 15 h 24 m
Reputation Power: 1827
Just put your a,b,c values into this formula

At the very least, you should be able to print a prompt, and read some values.
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper

#3
January 26th, 2013, 08:01 AM
 prax1980
Registered User

Join Date: Jan 2013
Posts: 3
Time spent in forums: 15 m 53 sec
Reputation Power: 0
Thanks for the reply. I believe there is some confusion, I am not looking for quadratic equation solving. I want to solve Non Linear Programming for optimization. Just for your reference, I want to perform the same thing what a solver does on excel. I found some stuff on linear programming; however, not able to find anything for non linear programming.

Cheers.

#4
January 26th, 2013, 11:15 AM
 b49P23TIvg
Contributing User

Join Date: Aug 2011
Posts: 4,174
Time spent in forums: 1 Month 3 Weeks 2 Days 11 h 47 m 24 sec
Reputation Power: 455
Having never used the excel solver, I'll answer anyway. Search the internet for multi-dimensional optimization algorithms. I like Nelder-Mead (also known as amoeba), no need to compute that nasty matrix of partial derivatives, although there are codes that estimate the Jacobian. Links:

gsl 1D minimization

gsl multi-dimensional minimization

netlib search
look for simplex
__________________
[code]Code tags[/code] are essential for python code!

 Viewing: Dev Shed Forums > Programming Languages > C Programming > Solving Quadratic programming in C