Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Function linprog
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Jeremy Rioult

Posts: 1
Registered: 5/3/13
Function linprog
Posted: May 3, 2013 2:56 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,
I have a problem with the function linprog. The solution doesn't converge and i don't understand why.
I try with the options, large scale, simplex, nothing works.
For example, for the 'interior point', the program exits with this message :

"Exiting: One or more of the residuals, duality gap, or total relative error
has grown 100000 times greater than its minimum value so far"

How can i do ?
Does the lines of the Matrix Aeq and Aineq must be independent ?

I give you my function and my matrix, if somebody can help me...

fct = [1 1 1 1 10000 10000 1 1 10000 150 150 150 150 150 150 100 100 100]

Matrix_Equal_constraints = [0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0
1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 0 0 1 1 -1 0 -1 0 0 0 0 0 0 0 0 0
-1 0 0 1 0 0 1 -1 0 0 0 0 0 0 0 0 0 0
0 0 0 -1 0 -1 0 1 1 0 0 0 0 0 0 0 0 0]

Matrix_Inequal_constraints = [1 0 0 0 0 0 0 0 0 -10 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 -10 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0 -10 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -10 0 0
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -10 0
1 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0
1 1 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0
0 0 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0
1 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0
0 0 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0]

a = [35.7143
0
0
0
0
0
0
0
0
0
0]

b =1.0e+03 * [0
0
0
0
0
0
0
0
3.5714
3.5714
3.5714
3.5714
3.5714]

lb = [0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0]

[X,Opti_Cost,exitflag,output,lambda] = linprog(fct,Matrix_Inequal_constraints,b,Matrix_Equal_constraints,a,lb)

Thanks a lot !!



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.