Ticket #14310: trac_14310.patch

File trac_14310.patch, 3.9 KB (added by ncohen, 8 years ago)
  • doc/en/thematic_tutorials/linear_programming.rst

    # HG changeset patch
    # User Nathann Cohen <nathann.cohen@gmail.com>
    # Date 1363692341 -3600
    # Node ID 5ed65b2c5b5f06692f6b1c9d0e3df2014b740263
    # Parent  d5f2dfc014530707f8a3744f4867c0073e08c0b9
    Removes optional parameters in a .pxd file, probably because of a Cython update
    
    diff --git a/doc/en/thematic_tutorials/linear_programming.rst b/doc/en/thematic_tutorials/linear_programming.rst
    a b  
    278278
    279279::
    280280
    281     sage: p.solve()
     281    sage: p.solve() # abs tol 1e-6
    282282    3.1502766806530307
    283283    sage: taken = p.get_values(taken)
    284284
     
    288288
    289289::
    290290
    291     sage: sum(weight[o] * taken[o] for o in L)
     291    sage: sum(weight[o] * taken[o] for o in L) # abs tol 1e-6
    292292    0.6964959796619171
    293293
    294294Should we take a flashlight?
  • sage/numerical/backends/coin_backend.pxd

    diff --git a/sage/numerical/backends/coin_backend.pxd b/sage/numerical/backends/coin_backend.pxd
    a b  
    2626    cdef cppclass CbcStrategy:
    2727        pass
    2828    cdef cppclass CbcStrategyDefault(CbcStrategy):
    29         CbcStrategyDefault(int cutsOnlyAtRoot=?, int numberStrong = ?, int numberBeforeTrust = ?, int printLevel = ?)
     29        CbcStrategyDefault()
    3030
    3131cdef extern from "../../local/include/coin/CoinPackedVectorBase.hpp":
    3232    cdef cppclass CoinPackedVectorBase:
     
    137137         # constructor from solver
    138138         CbcModel(OsiSolverInterface & si)
    139139         # assigning, owning solver
    140          void assignSolver(OsiSolverInterface * & solver, bool deleteSolver=?)
     140         void assignSolver(OsiSolverInterface * & solver)
    141141         void setModelOwnsSolver(bool ourSolver)
    142142         # get solver
    143143         OsiSolverInterface * solver()
    144144         # copy constructor
    145          CbcModel(CbcModel & rhs, int cloneHandler = ?)
     145         CbcModel(CbcModel & rhs)
    146146         # shut up
    147147         void setLogLevel(int value)
    148148         int logLevel()
     
    152152         void setNumberThreads (int)
    153153         int getSolutionCount()
    154154         # solve
    155          void branchAndBound(int doStatistics = ?)
     155         void branchAndBound()
    156156         # not sure we need this but it can't hurt
    157157         CoinMessageHandler * messageHandler ()
    158158     void CbcMain0(CbcModel m)
  • sage/numerical/backends/coin_backend.pyx

    diff --git a/sage/numerical/backends/coin_backend.pyx b/sage/numerical/backends/coin_backend.pyx
    a b  
    3939        self.prob_name = None
    4040        self.row_names = []
    4141        self.col_names = []
     42        self.set_verbosity(0)
    4243
    4344        if maximization:
    4445            self.set_sense(+1)
  • sage/numerical/mip.pyx

    diff --git a/sage/numerical/mip.pyx b/sage/numerical/mip.pyx
    a b  
    10231023
    10241024        EXAMPLE::
    10251025
    1026             sage: p = MixedIntegerLinearProgram()
     1026            sage: p = MixedIntegerLinearProgram(solver="GLPK")
    10271027            sage: x = p.new_variable()
    10281028            sage: p.set_objective(x[1] + x[2])
    10291029            sage: p.add_constraint(-3*x[1] + 2*x[2], max=2,name="OneConstraint")
     
    10341034        For information about the MPS file format :
    10351035        http://en.wikipedia.org/wiki/MPS_%28format%29
    10361036        """
    1037        
    10381037        self._backend.write_mps(filename, modern)
    10391038
    10401039    def write_lp(self,filename):
     
    10491048          to be written.
    10501049
    10511050        EXAMPLE::
    1052        
    1053             sage: p = MixedIntegerLinearProgram()
     1051
     1052            sage: p = MixedIntegerLinearProgram(solver="GLPK")
    10541053            sage: x = p.new_variable()
    10551054            sage: p.set_objective(x[1] + x[2])
    10561055            sage: p.add_constraint(-3*x[1] + 2*x[2], max=2)
     
    11441143            elif self._variables.has_key(l):
    11451144                #val.append(self._values[l])
    11461145                val.append(self._backend.get_variable_value(self._variables[l]))
    1147            
     1146
    11481147        if len(lists) == 1:
    11491148            return val[0]
    11501149        else: