Thanks to Dima, I have found the correct way of giving the constraints. 
Inequalities on individual variables seem to need the set_min and set_max 
methods. I have updated the worksheet below to show the new code.

On Saturday, January 21, 2012 5:02:03 PM UTC+8, P Purkayastha wrote:
>
> Hi,
>   It looks to me like there is something weird going on in the 
> implementation of linear programming in Sage. A very simple linear program 
> that I set up gives an incorrect solution. The worksheet is here:
> http://test.sagenb.org/home/pub/26/
> I also tried changing the backend, but it seems I don't have the Coin or 
> CPLEX backend installed.
>
> On the other hand, it gives the correct result on Mathematica. Can anyone 
> tell me what I am doing wrong?
>
>

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to