1cimport numpy as np 2from cpython.ref cimport PyObject 3 4############################# 5#Combinatorial cuts: 6############################# 7cdef extern from "CglAllDifferent.hpp": 8 cdef cppclass CppCglAllDifferent "CglAllDifferent": 9 pass 10 11cdef extern from "CglClique.hpp": 12 cdef cppclass CppCglClique "CglClique": 13 pass 14 15cdef extern from "CglKnapsackCover.hpp": 16 cdef cppclass CppCglKnapsackCover "CglKnapsackCover": 17 int getMaxInKnapsack() 18 void setMaxInKnapsack(int) 19 20cdef extern from "CglOddHole.hpp": 21 cdef cppclass CppCglOddHole "CglOddHole": 22 pass 23 24############################# 25#Flow cover cuts: 26############################# 27 28cdef extern from "CglFlowCover.hpp": 29 cdef cppclass CppCglFlowCover "CglFlowCover": 30 pass 31 32############################# 33#Gomory cuts and variants: 34############################# 35 36cdef extern from "CglGomory.hpp": 37 cdef cppclass CppCglGomory "CglGomory": 38 int getLimit() 39 void setLimit(int) 40 41cdef extern from "CglRedSplit.hpp": 42 cdef cppclass CppCglRedSplit "CglRedSplit": 43 pass 44 45############################# 46#Lift-and-project cuts: 47############################# 48 49cdef extern from "CglLiftAndProject.hpp": 50 cdef cppclass CppCglLiftAndProject "CglLiftAndProject": 51 pass 52 53cdef extern from "CglLandP.hpp": 54 cdef cppclass CppCglLandP "CglLandP": 55 pass 56 57############################# 58#Mixed integer rounding cuts and variants: 59############################# 60 61cdef extern from "CglMixedIntegerRounding.hpp": 62 cdef cppclass CppCglMixedIntegerRounding "CglMixedIntegerRounding": 63 pass 64 65cdef extern from "CglMixedIntegerRounding2.hpp": 66 cdef cppclass CppCglMixedIntegerRounding2 "CglMixedIntegerRounding2": 67 pass 68 69cdef extern from "CglTwomir.hpp": 70 cdef cppclass CppCglTwomir "CglTwomir": 71 pass 72 73cdef extern from "CglResidualCapacity.hpp": 74 cdef cppclass CppCglResidualCapacity "CglResidualCapacity": 75 pass 76 77############################# 78#Strengthening: 79############################# 80 81#cdef extern from "CglDuplicateRow.hpp": 82# cdef cppclass CppCglDuplicateRow "CglDuplicateRow": 83# pass 84 85cdef extern from "CglPreProcess.hpp": 86 cdef cppclass CppCglPreProcess "CglPreProcess": 87 pass 88 89cdef extern from "CglProbing.hpp": 90 cdef cppclass CppCglProbing "CglProbing": 91 pass 92 93cdef extern from "CglSimpleRounding.hpp": 94 cdef cppclass CppCglSimpleRounding "CglSimpleRounding": 95 pass 96 97## parent of all cuts 98cdef extern from "CglCutGenerator.hpp": 99 cdef cppclass CppCglCutGenerator "CglCutGenerator": 100 pass 101 102 103cdef class CyCglCutGenerator: 104 cdef CppCglCutGenerator* CppSelf 105 106########### 107 108cdef class CyCglAllDifferent(CyCglCutGenerator): 109 pass 110 111cdef class CyCglClique(CyCglCutGenerator): 112 pass 113 114cdef class CyCglKnapsackCover(CyCglCutGenerator): 115 cdef CppCglKnapsackCover* realCppSelf(self) 116 117cdef class CyCglOddHole(CyCglCutGenerator): 118 pass 119 120################## 121 122cdef class CyCglFlowCover(CyCglCutGenerator): 123 pass 124 125################## 126 127cdef class CyCglGomory(CyCglCutGenerator): 128 cdef CppCglGomory* realCppSelf(self) 129 #cdef CppCglGomory* CppSelf 130 #cdef CppCglCutGenerator* CppSelf 131 132cdef class CyCglRedSplit(CyCglCutGenerator): 133 pass 134 135################### 136 137cdef class CyCglLiftAndProject(CyCglCutGenerator): 138 pass 139 140cdef class CyCglLandP(CyCglCutGenerator): 141 pass 142 143################### 144 145cdef class CyCglMixedIntegerRounding(CyCglCutGenerator): 146 pass 147 148cdef class CyCglMixedIntegerRounding2(CyCglCutGenerator): 149 pass 150 151cdef class CyCglTwomir(CyCglCutGenerator): 152 pass 153 154cdef class CyCglResidualCapacity(CyCglCutGenerator): 155 pass 156 157#################### 158 159#cdef class CyCglDuplicateRow(CyCglCutGenerator): 160# pass 161 162cdef class CyCglPreProcess(CyCglCutGenerator): 163 pass 164 165cdef class CyCglProbing(CyCglCutGenerator): 166 pass 167 168cdef class CyCglSimpleRounding(CyCglCutGenerator): 169 pass 170 171