# 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
|
|
278 | 278 | |
279 | 279 | :: |
280 | 280 | |
281 | | sage: p.solve() |
| 281 | sage: p.solve() # abs tol 1e-6 |
282 | 282 | 3.1502766806530307 |
283 | 283 | sage: taken = p.get_values(taken) |
284 | 284 | |
… |
… |
|
288 | 288 | |
289 | 289 | :: |
290 | 290 | |
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 |
292 | 292 | 0.6964959796619171 |
293 | 293 | |
294 | 294 | Should we take a flashlight? |
diff --git a/sage/numerical/backends/coin_backend.pxd b/sage/numerical/backends/coin_backend.pxd
a
|
b
|
|
26 | 26 | cdef cppclass CbcStrategy: |
27 | 27 | pass |
28 | 28 | cdef cppclass CbcStrategyDefault(CbcStrategy): |
29 | | CbcStrategyDefault(int cutsOnlyAtRoot=?, int numberStrong = ?, int numberBeforeTrust = ?, int printLevel = ?) |
| 29 | CbcStrategyDefault() |
30 | 30 | |
31 | 31 | cdef extern from "../../local/include/coin/CoinPackedVectorBase.hpp": |
32 | 32 | cdef cppclass CoinPackedVectorBase: |
… |
… |
|
137 | 137 | # constructor from solver |
138 | 138 | CbcModel(OsiSolverInterface & si) |
139 | 139 | # assigning, owning solver |
140 | | void assignSolver(OsiSolverInterface * & solver, bool deleteSolver=?) |
| 140 | void assignSolver(OsiSolverInterface * & solver) |
141 | 141 | void setModelOwnsSolver(bool ourSolver) |
142 | 142 | # get solver |
143 | 143 | OsiSolverInterface * solver() |
144 | 144 | # copy constructor |
145 | | CbcModel(CbcModel & rhs, int cloneHandler = ?) |
| 145 | CbcModel(CbcModel & rhs) |
146 | 146 | # shut up |
147 | 147 | void setLogLevel(int value) |
148 | 148 | int logLevel() |
… |
… |
|
152 | 152 | void setNumberThreads (int) |
153 | 153 | int getSolutionCount() |
154 | 154 | # solve |
155 | | void branchAndBound(int doStatistics = ?) |
| 155 | void branchAndBound() |
156 | 156 | # not sure we need this but it can't hurt |
157 | 157 | CoinMessageHandler * messageHandler () |
158 | 158 | void CbcMain0(CbcModel m) |
diff --git a/sage/numerical/backends/coin_backend.pyx b/sage/numerical/backends/coin_backend.pyx
a
|
b
|
|
39 | 39 | self.prob_name = None |
40 | 40 | self.row_names = [] |
41 | 41 | self.col_names = [] |
| 42 | self.set_verbosity(0) |
42 | 43 | |
43 | 44 | if maximization: |
44 | 45 | self.set_sense(+1) |
diff --git a/sage/numerical/mip.pyx b/sage/numerical/mip.pyx
a
|
b
|
|
1023 | 1023 | |
1024 | 1024 | EXAMPLE:: |
1025 | 1025 | |
1026 | | sage: p = MixedIntegerLinearProgram() |
| 1026 | sage: p = MixedIntegerLinearProgram(solver="GLPK") |
1027 | 1027 | sage: x = p.new_variable() |
1028 | 1028 | sage: p.set_objective(x[1] + x[2]) |
1029 | 1029 | sage: p.add_constraint(-3*x[1] + 2*x[2], max=2,name="OneConstraint") |
… |
… |
|
1034 | 1034 | For information about the MPS file format : |
1035 | 1035 | http://en.wikipedia.org/wiki/MPS_%28format%29 |
1036 | 1036 | """ |
1037 | | |
1038 | 1037 | self._backend.write_mps(filename, modern) |
1039 | 1038 | |
1040 | 1039 | def write_lp(self,filename): |
… |
… |
|
1049 | 1048 | to be written. |
1050 | 1049 | |
1051 | 1050 | EXAMPLE:: |
1052 | | |
1053 | | sage: p = MixedIntegerLinearProgram() |
| 1051 | |
| 1052 | sage: p = MixedIntegerLinearProgram(solver="GLPK") |
1054 | 1053 | sage: x = p.new_variable() |
1055 | 1054 | sage: p.set_objective(x[1] + x[2]) |
1056 | 1055 | sage: p.add_constraint(-3*x[1] + 2*x[2], max=2) |
… |
… |
|
1144 | 1143 | elif self._variables.has_key(l): |
1145 | 1144 | #val.append(self._values[l]) |
1146 | 1145 | val.append(self._backend.get_variable_value(self._variables[l])) |
1147 | | |
| 1146 | |
1148 | 1147 | if len(lists) == 1: |
1149 | 1148 | return val[0] |
1150 | 1149 | else: |