Ask Your Question

How to solve linear programming in matrix form?

asked 2014-09-15 08:57:38 -0600

Han gravatar image

Some times I have to solve large scale linear programming where the the constraints are given in matrix. However, all tutorials provided only demonstrate very small scale cases. What if I have a linear programming given in a 1000*400 matrix. How to solve such a linear programming in Sage? Do I need to use another package to solve such linear programming problems?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2014-09-15 10:43:40 -0600

Using a matrix of constraints has been implemented, and will be released soon (in Sage 6.4). See You already might try installing the changes from this ticket into Sage 6.3 and use them.

edit flag offensive delete link more


Thank you so much for all your efforts. Good to know there will be an implement for matrix constraints in MILP. Looking forward to trying the new release of Sage.

Han gravatar imageHan ( 2014-09-16 07:18:47 -0600 )edit

answered 2014-09-15 10:20:04 -0600

tmonteil gravatar image

Did you try anything ? What happens if you input your matrix in the examples given in the tutorial ?

Look at the linear_program function on this page, use RDF for your floating-point real numbers, and tell us what happens !

edit flag offensive delete link more


Thank you so much for your suggestions. I went to the page you mentioned above and my problem was well solved. I would also like to take your answer as a correct answer. However, it seems that the system allows only one correct answer. Even though we already have an linear_program function in sage to solve LP in matrix form. However, to my knowledge, [Dima]( provides an new syntax to solve MILP in matrix form. So let us leave the credit to the real contributors of sage.

Han gravatar imageHan ( 2014-09-16 08:02:01 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-09-15 08:57:38 -0600

Seen: 521 times

Last updated: Sep 15 '14