#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0

    Solving Quadratic programming in C


    I want to solve a non linear program specifically quadratic programming in C code. Kindly assist me how to solve the same.
  2. #2
  3. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,379
    Rep Power
    1871
    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
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep 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.
  6. #4
  7. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,841
    Rep Power
    480
    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 and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo