#6502: [with patch, needs review] Linear Program Solver and Mixed Integer 
Program
Solver in Sage
-------------------------+--------------------------------------------------
 Reporter:  ncohen       |       Owner:  jkantor
     Type:  enhancement  |      Status:  new    
 Priority:  major        |   Milestone:         
Component:  numerical    |    Keywords:         
 Reviewer:               |      Author:         
   Merged:               |  
-------------------------+--------------------------------------------------

Comment(by wdj):

 I reinstalled glpk and rebuilt the clone which had MIP1, MIP2, MIP3
 applied. This time, it compiled fine:-)

 Hopwever the was the following error:

 {{{

 w...@hera:~/sagefiles/sage-4.1.1.alpha1$ ./sage -t
 "devel/sage/sage/numerical/mip.pyx"
 sage -t  "devel/sage/sage/numerical/mip.pyx"
 **********************************************************************
 File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/devel/sage/sage/numerical/mip.pyx",
 line 280:
     sage: p.show()
 Exception raised:
     Traceback (most recent call last):
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_10[5]>", line 1, in <module>
         p.show()###line 280:
     sage: p.show()
       File "mip.pyx", line 130, in sage.numerical.mip.MIP.show
 (sage/numerical/mip.cpp:1335)
       File "mip.pyx", line 108, in sage.numerical.mip.MIP.export
 (sage/numerical/mip.cpp:1047)
       File "mip.pyx", line 604, in sage.numerical.mip.Constraint.__init__
 (sage/numerical/mip.cpp:5791)
     AttributeError: 'NoneType' object has no attribute 'copy'
 **********************************************************************
 File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/devel/sage/sage/numerical/mip.pyx",
 line 303:
     sage: p.addbound("x",min=3,max=8)
 Exception raised:
     Traceback (most recent call last):
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_11[4]>", line 1, in <module>
         p.addbound("x",min=Integer(3),max=Integer(8))###line 303:
     sage: p.addbound("x",min=3,max=8)
     AttributeError: MIP instance has no attribute 'addbound'
 **********************************************************************
 File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/devel/sage/sage/numerical/mip.pyx",
 line 304:
     sage: p.show()
 Exception raised:
     Traceback (most recent call last):
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_11[5]>", line 1, in <module>
         p.show()###line 304:
     sage: p.show()
       File "mip.pyx", line 130, in sage.numerical.mip.MIP.show
 (sage/numerical/mip.cpp:1335)
       File "mip.pyx", line 108, in sage.numerical.mip.MIP.export
 (sage/numerical/mip.cpp:1047)
       File "mip.pyx", line 604, in sage.numerical.mip.Constraint.__init__
 (sage/numerical/mip.cpp:5791)
     AttributeError: 'NoneType' object has no attribute 'copy'
 **********************************************************************
 File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/devel/sage/sage/numerical/mip.pyx",
 line 372:
     sage: p.solve()
 Expected:
     [4.0, {'x': 2.0, 'y': 0.0}]
 Got:
     [2.6666666666666665, {'y': 1.3333333333333333, 'x': 0.0}]
 **********************************************************************
 File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/devel/sage/sage/numerical/mip.pyx",
 line 374:
     sage: p.solve(objective_only=True)
 Expected:
     4.0
 Got:
     2.6666666666666665
 **********************************************************************
 File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/devel/sage/sage/numerical/mip.pyx",
 line 102:
     sage: print p.export(format="text")
 Exception raised:
     Traceback (most recent call last):
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_3[4]>", line 1, in <module>
         print p.export(format="text")###line 102:
     sage: print p.export(format="text")
       File "mip.pyx", line 108, in sage.numerical.mip.MIP.export
 (sage/numerical/mip.cpp:1047)
       File "mip.pyx", line 604, in sage.numerical.mip.Constraint.__init__
 (sage/numerical/mip.cpp:5791)
     AttributeError: 'NoneType' object has no attribute 'copy'
 **********************************************************************
 File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/devel/sage/sage/numerical/mip.pyx",
 line 126:
     sage: p.show()
 Exception raised:
     Traceback (most recent call last):
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_4[5]>", line 1, in <module>
         p.show()###line 126:
     sage: p.show()
       File "mip.pyx", line 130, in sage.numerical.mip.MIP.show
 (sage/numerical/mip.cpp:1335)
       File "mip.pyx", line 108, in sage.numerical.mip.MIP.export
 (sage/numerical/mip.cpp:1047)
       File "mip.pyx", line 604, in sage.numerical.mip.Constraint.__init__
 (sage/numerical/mip.cpp:5791)
     AttributeError: 'NoneType' object has no attribute 'copy'
 **********************************************************************
 File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/devel/sage/sage/numerical/mip.pyx",
 line 159:
     sage: p.solve()
 Expected:
     [4.0, {'x': 2.0, 'y': 0.0}]
 Got:
     [2.6666666666666665, {'y': 1.3333333333333333, 'x': 0.0}]
 **********************************************************************
 File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/devel/sage/sage/numerical/mip.pyx",
 line 195:
     sage: p.solve()
 Expected:
     [4.0, {'x': 2.0, 'y': 0.0}]
 Got:
     [2.6666666666666665, {'y': 1.3333333333333333, 'x': 0.0}]
 **********************************************************************
 File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/devel/sage/sage/numerical/mip.pyx",
 line 214:
     sage: p.show()
 Exception raised:
     Traceback (most recent call last):
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_7[5]>", line 1, in <module>
         p.show()###line 214:
     sage: p.show()
       File "mip.pyx", line 130, in sage.numerical.mip.MIP.show
 (sage/numerical/mip.cpp:1335)
       File "mip.pyx", line 108, in sage.numerical.mip.MIP.export
 (sage/numerical/mip.cpp:1047)
       File "mip.pyx", line 604, in sage.numerical.mip.Constraint.__init__
 (sage/numerical/mip.cpp:5791)
     AttributeError: 'NoneType' object has no attribute 'copy'
 **********************************************************************
 File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/devel/sage/sage/numerical/mip.pyx",
 line 231:
     sage: p.show()
 Exception raised:
     Traceback (most recent call last):
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_8[5]>", line 1, in <module>
         p.show()###line 231:
     sage: p.show()
       File "mip.pyx", line 130, in sage.numerical.mip.MIP.show
 (sage/numerical/mip.cpp:1335)
       File "mip.pyx", line 108, in sage.numerical.mip.MIP.export
 (sage/numerical/mip.cpp:1047)
       File "mip.pyx", line 604, in sage.numerical.mip.Constraint.__init__
 (sage/numerical/mip.cpp:5791)
     AttributeError: 'NoneType' object has no attribute 'copy'
 **********************************************************************
 File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/devel/sage/sage/numerical/mip.pyx",
 line 248:
     sage: p.show()
 Exception raised:
     Traceback (most recent call last):
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/home/wdj/sagefiles/sage-4.1.1.alpha1/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_9[5]>", line 1, in <module>
         p.show()###line 248:
     sage: p.show()
       File "mip.pyx", line 130, in sage.numerical.mip.MIP.show
 (sage/numerical/mip.cpp:1335)
       File "mip.pyx", line 108, in sage.numerical.mip.MIP.export
 (sage/numerical/mip.cpp:1047)
       File "mip.pyx", line 604, in sage.numerical.mip.Constraint.__init__
 (sage/numerical/mip.cpp:5791)
     AttributeError: 'NoneType' object has no attribute 'copy'
 **********************************************************************
 10 items had failures:
    1 of   6 in __main__.example_10
    2 of   6 in __main__.example_11
    2 of  15 in __main__.example_12
    1 of   5 in __main__.example_3
    1 of   6 in __main__.example_4
    1 of   7 in __main__.example_5
    1 of   7 in __main__.example_6
    1 of   6 in __main__.example_7
    1 of   6 in __main__.example_8
    1 of   6 in __main__.example_9
 ***Test Failed*** 12 failures.
 For whitespace errors, see the file
 /home/wdj/sagefiles/sage-4.1.1.alpha1/tmp/.doctest_mip.py
          [3.3 s]
 exit code: 1024

 }}}

 Do you know what these mean?

 This was with sage 4.1.1.a1 and on an amd64 ubuntu 9.04 machine.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6502#comment:24>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to