Ticket #9570: trac_9570-fix.patch

File trac_9570-fix.patch, 939 bytes (added by lsampaio, 11 years ago)

Fixes the AttributeError? that was returned when no mip solver was specified by the user

  • sage/numerical/mip.pyx

    # HG changeset patch
    # User "Leonardo Sampaio <darthleonardo@gmail.com>"
    # Date 1279872926 -28800
    # Node ID df33f651f8ccea3e6a4082b30a11ed1c156818dc
    # Parent  b8948f614f745501a034c57f1c4dff21e1f25a63
    [mq]: fix
    
    diff -r b8948f614f74 -r df33f651f8cc sage/numerical/mip.pyx
    a b  
    6363            sage: p = MixedIntegerLinearProgram(maximization=True)
    6464        """
    6565       
    66 
     66        self._default_solver = None
    6767       
    6868        try:
    6969            if self._default_solver == None:
     
    721721            sage: p.set_objective(x[1] + 5*x[2])
    722722            sage: p.add_constraint(x[1] + 0.2*x[2] <= 4)
    723723            sage: p.add_constraint(1.5*x[1] + 3*x[2] <= 4)
    724             sage: p.solve()
    725             6.6666666666666661
     724            sage: round(p.solve(), 5)
     725            6.66667
    726726
    727727
    728728        TESTS::